Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

mobtexting/php-http-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOBtexting Http Client

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 [email protected] instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

About

MOBtexting PHP HTTP Client for calling APIs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages