Skip to content


MIT 648 14 103,590
213.6 million (month) Aug 29 2014 1.6.7(a month ago)
1,152 19 24 MIT
0.110.0(24 days ago) Oct 31 2009 2.7 million (month)

axios is a popular JavaScript library that allows you to make HTTP requests from a Node.js environment. It is a promise-based library that works in both the browser and Node.js. It is similar to the Fetch API, but with a more powerful feature set and better browser compatibility.

One of the main benefits of using axios is that it automatically transforms the response data into a JSON object, making it easy to work with.

Axios is known for user-friendly API and support for asynchronous async/await syntax making it very accessible in web scraping.

Excon is a Ruby library for making HTTP requests. It is designed to be fast and efficient, and is often used as a building block for other Ruby libraries and frameworks.

One of the main features of Excon is its support for persistent connections, which allows it to reuse the same connection for multiple requests, reducing the overhead of establishing a new connection for each request.

Excon also supports streaming requests and responses, which allows you to read or write data to the server incrementally, without having to load the entire response into memory at once.

Example Use

// axios can be used with promises:
  .then(response => {
  .catch(error => {

// or async await syntax:
var resp = await axios.get('');

// to make requests concurrently Promise.all function can be used:
const results = await Promise.all([

// axios also supports other type of requests like POST and even automatically serialize them:
await'', {'query': 'hello world'});
// or formdata
const data = {name: 'John Doe', email: ''};

        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'

// default values like headers can be configured globally
axios.defaults.headers.common['User-Agent'] = '';
// or for session instance:
const instance = axios.create({
  headers: {"User-Agent": ""},
require 'excon'

# GET requests
response = Excon.get('')
puts response.body
puts response.status
puts response.headers

# POST requests
response ='',
  :body => { :title => 'foo', :body => 'bar', :userId => 1 }.to_json,
  :headers => { 'Content-Type' => 'application/json' } )
puts response.body

Alternatives / Similar