PHP code example of bitstone / guzzle-wrapper

1. Go to this page and download the library: Download bitstone/guzzle-wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bitstone / guzzle-wrapper example snippets


Bitstone\GuzzleWrapper\HttpServiceProvider::class

'Http' => Bitstone\GuzzleWrapper\Http::class

Http::request('GET', http://example.com/api/v1/users', ['role' => 'admin'], ['Content-Type' => 'application/json']);

Http::request('GET', http://example.com/api/v1/users?role=admin', [], ['Content-Type' => 'application/json']);

Http::request('POST', http://example.com/api/v1/users', ['option' => 'value'], ['Content-Type' => 'application/json', 'Accept' => 'application/json']);

Http::get('http://example.com/api/v1/users');

Http::post('http://example.com/api/v1/users/1', ['option' => 'value'], ['Accept' => 'application/json']);

Http::put('http://example.com/api/v1/users/1', ['option' => 'another value'], ['Accept' => 'application/json']);

Http::delete('http://example.com/api/v1/users/1');

Http::head('http://example.com/api/v1/users/1');