An open API service indexing awesome lists of open source software.

https://github.com/bigcommerce/net-http

A basic HTTP client.
https://github.com/bigcommerce/net-http

Last synced: 3 months ago
JSON representation

A basic HTTP client.

Awesome Lists containing this project

README

          

HTTP Client
===========

Provides a basic HTTP client that wraps the PHP curl extension.

Making a GET request:

```php
$client = new Net_Http_Client();
$client->get("http://bigcommerce.com/");
$body = $client->getBody();
$contentType = $client->getHeader("Content-Type");
```

Making a POST request:

```php
$client = new Net_Http_Client();
$client->post("http://bigcommerce.com/contact.php", array("key"=>"value"));
$responseCode = $client->getStatus();
if ($responseCode != 200) {
// the request returned an error response
}
```