PHPackages                             iamserjo/php-http-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. iamserjo/php-http-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

iamserjo/php-http-client
========================

HTTP REST client, simplified for PHP

3.10.6(6y ago)0171MITPHPPHP &gt;=5.6

Since Mar 21Pushed 6y agoCompare

[ Source](https://github.com/iamserjo/php-http-client)[ Packagist](https://packagist.org/packages/iamserjo/php-http-client)[ Docs](http://github.com/sendgrid/php-http-client)[ RSS](/packages/iamserjo-php-http-client/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (29)Used By (1)

[![SendGrid Logo](https://camo.githubusercontent.com/504f66e1bdbed83b78275829c62db683a9c10d06b983d7770cdddb106b66af3d/68747470733a2f2f756975782e73332e616d617a6f6e6177732e636f6d2f323031362d6c6f676f732f656d61696c2d6c6f676f25343032782e706e67)](https://camo.githubusercontent.com/504f66e1bdbed83b78275829c62db683a9c10d06b983d7770cdddb106b66af3d/68747470733a2f2f756975782e73332e616d617a6f6e6177732e636f6d2f323031362d6c6f676f732f656d61696c2d6c6f676f25343032782e706e67)

[![Travis Badge](https://camo.githubusercontent.com/b7482f575ba1bb38844c818a70fbe9225753bbf70490623e2194d602b6c0e5f2/68747470733a2f2f7472617669732d63692e6f72672f73656e64677269642f7068702d687474702d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sendgrid/php-http-client)[![Latest Version on Packagist](https://camo.githubusercontent.com/99ba58dd265f9d13b4ceda23bd893a7e9dc873474b798700c7c1d1b5706fa765/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656e64677269642f7068702d687474702d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sendgrid/php-http-client)[![Email Notifications Badge](https://camo.githubusercontent.com/b25e6b50959f1da489ed24095e6710a97f9fb4d90b60cec9e334d3c1985b8b2b/68747470733a2f2f64782e73656e64677269642e636f6d2f62616467652f706870)](https://dx.sendgrid.com/newsletter/php)[![Twitter Follow](https://camo.githubusercontent.com/de94c561669f318291c017e2043b37498ea2f8820d5f35be0af56fe149c1a793/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f73656e64677269642e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)](https://twitter.com/sendgrid)[![GitHub contributors](https://camo.githubusercontent.com/fe117bc8d8e434b1b8427b2963baba82682d93412a3842b380cf4c41b1d6dae5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f73656e64677269642f7068702d687474702d636c69656e742e737667)](https://github.com/sendgrid/php-http-client/graphs/contributors)[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](./LICENSE.md)

**Quickly and easily access any RESTful or RESTful-like API.**

If you are looking for the SendGrid API client library, please see [this repo](https://github.com/sendgrid/sendgrid-php).

Announcements
=============

[](#announcements)

All updates to this library are documented in our [CHANGELOG](https://github.com/sendgrid/php-http-client/blob/master/CHANGELOG.md).

Table of Contents
=================

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Usage](#usage)
- [Roadmap](#roadmap)
- [How to Contribute](#contribute)
- [Thanks](#thanks)
- [About](#about)
- [License](#license)

Installation
============

[](#installation)

Prerequisites
-------------

[](#prerequisites)

- PHP version 5.6, 7.0, 7.1, 7.2, 7.3, or 7.4

Install with Composer
---------------------

[](#install-with-composer)

Add php-http-client to your `composer.json` file. If you are not using [Composer](http://getcomposer.org), you should be. It's an excellent way to manage dependencies in your PHP application.

```
{
  "require": {
    "sendgrid/php-http-client": "^3.10.6"
  }
}
```

Then at the top of your PHP script require the autoloader:

```
require __DIR__ . '/vendor/autoload.php';
```

Then from the command line:

```
composer install
```

Install without Composer
------------------------

[](#install-without-composer)

You should create a `lib` directory in the directory of your application and clone to `lib` repositories [php-http-client](https://github.com/sendgrid/php-http-client.git) and [sendgrid-php](https://github.com/sendgrid/sendgrid-php.git):

```
$ cd /path/to/your/app
$ mkdir lib
$ cd lib
$ git clone https://github.com/sendgrid/php-http-client.git

```

In the next step you should create `loader.php`:

```
$ cd /path/to/your/app
$ touch loader.php

```

And add the code below to the `loader.php`:

```
