PHP code example of weblabnl / restclient

1. Go to this page and download the library: Download weblabnl/restclient 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/ */

    

weblabnl / restclient example snippets


$api = new \Weblab\RESTClient\RESTClient();

$adapter = (new \Weblab\RESTClient\Adapters\OAuth)
    ->setAccessToken($accessToken);

$api->setAdapter($adapter);
$api->setBaseURL('https://api.weblab.nl');

$result = $api->post('/users', ['first_name' => 'Ankie', 'last_name' => 'Visser']);