Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

matricali/php-http-client

Repository files navigation

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.

About

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

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

Languages

AltStyle によって変換されたページ (->オリジナル) /