PHP code example of progresivjose / arc-api-connector

1. Go to this page and download the library: Download progresivjose/arc-api-connector 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/ */

    

progresivjose / arc-api-connector example snippets


import GuzzleHttp\Client;

$client = new \Progresivjose\ArcApiConnector(new Client, 'ARC API SECRET TOKEN');

//making a simple request
$this->client->get('https://example.test');

//passing params to the request
$this->client->get('https://example.test', ['foo' => 'bar']);

//example of post as form_params
$this->client->post('https://example.test'. ['name' => 'John', 'lastname' => 'Doe']);

//example of post as json body
$this->client->post('http://example.test', ['name' => 'John', 'lastname' => 'Doe'], 'json');

//example of post as multipart
$this->client->post('http://example.test', ['name' => 'John', 'lastname' => 'Doe'], 'multipart');