You can install the package via composer:
composer require mobtexting/php-http-client
$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()
);
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.