Skip to content


MIT 31 13 22,795
448.0 thousand (month) Nov 14 2011 7.8.0(7 months ago)
506 3 11 NA
1.1.4(4 years ago) Apr 20 2010 39.9 thousand (month)

Guzzle is a PHP HTTP client library that makes it easy to send HTTP requests and trivial to integrate with web services. It allows you to send HTTP/1.1 requests with various methods like GET, POST, PUT, DELETE, and others.

Guzzle also supports sending both synchronous and asynchronous requests, caching, and even has built-in support for OAuth 1.0a. Additionally, it can handle different HTTP errors and handle redirects automatically. It also has built-in support for serializing and deserializing data using formats like JSON and XML, as well as sending multipart file uploads.

Overall Guzzle is an easy to use and powerful library for working with HTTP in PHP.

Nestful is a Ruby library for making HTTP requests. It is designed to provide a simple, easy-to-use interface for making requests and handling responses. Nestful is often used for making requests to RESTful APIs.

One of the main features of Nestful is its ability to automatically parse JSON and XML responses and return them as Ruby objects. This allows developers to easily access the data returned by an API without having to manually parse the response.

Netful is aimed at interacting with rest APIs and provides a convenient interface (see example below)

Example Use

use GuzzleHttp\Client;

// Create a client session:
$client = new Client();
// can also set session details like headers
$client = new Client([
    'headers' => [
        'User-Agent' => '',

// GET request:
$response = $client->get('');
// print all details
// or the important bits
printf("status: %s\n", $response->getStatusCode());
printf("headers: %s\n", json_encode($response->getHeaders(), JSON_PRETTY_PRINT));
printf("body: %s", $response->getBody()->getContents());

// POST request
$response = $client->post(
// for JSON use json argument:
    ['json' => ['query' => 'foobar', 'page' => 2]]
// or formdata use form_params:
//  ['form_params' => ['query' => 'foobar', 'page' => 2]]

// For ASYNC requests getAsync function can be used:
$promise1 = $client->getAsync('');
$promise2 = $client->getAsync('');
// await it:
$results = Promise\unwrap([$promise1, $promise2]);
foreach ($results as $result) {
    echo $result->getBody();
// or add promise callback
Promise\each([$promise1, $promise2], function ($response, $index, $callable) {
    echo $response->getBody();
require 'nestful'

# GET request
response = Nestful.get('')
puts response.body
puts response.code
puts response.headers

# POST request
response =
    :format => :json, :payload => { :title => 'foo', :body => 'bar', :userId => 1 }
puts response.body

# establish interface to a specific API
class Charge < Nestful::Resource
  endpoint ''
  options :auth_type => :bearer, :password => 'sk_bar'

  def self.all

  def self.find(id)

  def refund

Charge.all #=> []

Alternatives / Similar