PHP code example of resty / resty
1. Go to this page and download the library: Download resty/resty 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/ */
resty / resty example snippets
curl -s https://getcomposer.org/installer | php
php composer.phar install
php
y\Resty;
$resty = new Resty();
$resty->setBaseURL('http://httpbin.org/');
$resp = $resty->get('headers');
echo "\n\$resp['status']:\n";
var_dump($resp['status']);
echo "\n\$resp['headers']:\n";
var_dump($resp['headers']);
echo "\n\$resp['body']:\n";
var_dump($resp['body']);
echo "\n\$resp['body_raw']:\n";
var_dump($resp['body_raw']);
php phpDocumentor.phar -d src/ -t docs/api --template clean