Skip to content


MIT 83 4 1,610
31.6 million (month) Dec 11 2011 3.3.1(2 months ago)
1,152 19 24 MIT
0.109.0(a month ago) Oct 31 2009 2.6 million (month)

needle is an HTTP client library for Node.js that provides a simple, flexible, and powerful API for making HTTP requests. It supports all major HTTP methods and has a clean and easy-to-use interface for handling responses and errors.

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

const needle = require('needle');

// needle supports both Promises and async/await
needle.get('', (err, res) => {
    if (err) {

const response = await needle.get('')

// concurrent requests can be sent using Promise.all
const results = await Promise.all([

// POST requests
const data = { name: 'John Doe' };
await'', data)

// proxy
const options = {
    proxy: ''
await needle.get('', options)

// headers and cookies
const options = {
  headers: {
      'Cookie': 'myCookie=123',
      'X-My-Header': 'myValue'
await needle.get('', options)
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