mobtexting / php-http-client
HTTP REST client, simplified for PHP
Installs: 993
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/mobtexting/php-http-client
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ~4.4
- squizlabs/php_codesniffer: ~2.0
This package is auto-updated.
Last update: 2023-08-29 01:50:52 UTC
README
Installation
You can install the package via composer:
composer require mobtexting/php-http-client
Usage
$token = 'xxxx'; $headers = ['Authorization: Bearer ' . $token]; $client = new Mobtexting\Client('https://api.example.com', $headers); $data = [ 'some' => 1, 'awesome' => 2, 'data' => 3 ]; $queryParams = [ 'hello' => 0, 'world' => 1 ]; $requestHeaders = [ 'X-Test' => 'test' ]; $response = $client->post($data, $queryParams, $requestHeaders); var_dump( $response->statusCode(), $response->headers(), $response->body() );
Security
If you discover any security related issues, please email support@mobtexting.com instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.