PHP code example of clarence / restful
1. Go to this page and download the library: Download clarence/restful 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/ */
clarence / restful example snippets
use Clarence\Restful\Curl\CurlRestClient;
// Do a GET request
$data = ['test' => 'test', 'hello' => 'world!'];
$jsonResponse = $restClient->get('http://localhost:8888/server/echo-globals.php', $data)->json();
// then use the $jsonRespose....