matricali/http-client

A wrapper of libcurl that implements PSR-7 HTTP message interface.

Installs: 50

Dependents: 0

Suggesters: 0

Security: 0

Stars: 8

Watchers: 1

Forks: 4

Open Issues: 3

pkg:composer/matricali/http-client

1.0.0-alpha3 2018-07-20 13:40 UTC

This package is auto-updated.

Last update: 2025-10-11 17:08:01 UTC


README

Latest stable release Build Status Coverage Status MIT licensed GitHub contributors

PSR-7 HTTP Client (cURL)

Note that this is not an HTTP protocol implementation of its own. It is merely a wrapper of libcurl that implements PSR-7 HTTP message interface.

Requirements

Installation

composer require matricali/http-client

Usage

Sending GET request
use Matricali\Http\Client;

$client = new Client();
$response = $client->get('http://www.example.com/');

echo $response->getBody();
Sending POST request
use Matricali\Http\Client;

$client = new Client();
$payload = '{"name": "John Doe"}';
$response = $client->post('http://www.example.com/', $payload);

echo $response->getBody();

Contributing

Contributions, issues, pull requests are welcome. See CONTRIBUTING.md

License

php-http-client is MIT licensed.