PHP code example of o2system / curl
1. Go to this page and download the library: Download o2system/curl 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/ */
o2system / curl example snippets
use O2System\Curl;
use O2System\Kernel\Http\Message\Uri;
// Single Request
$request = new Curl\Request();
$request->setUri( new Uri() )->withHost( 'api.o2system.id' )->withPath( 'testing');
// Multi Request
$multirequest = new Curl\MultiRequest();
$multirequest->register( $request );
// Get single response
$response = $request->get();
// Get multiple responses
$responses = $multirequest->get();