1. Go to this page and download the library: Download sfadless/http 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/ */
sfadless / http example snippets
use Sfadless\Utils\Http\Http;
e = $http->get('http://some.url');
$response = $http->post('http://some.url');
use Sfadless\Utils\Http\Http;
use Sfadless\Utils\Http\Format\Request\ArrayRequestFormat;
use Sfadless\Utils\Http\Format\Response\JsonResponseFormat;
$http = new Http(
new ArrayRequestFormat(), //instanse of RequestFormatInterface, used by default
new JsonResponseFormat(), //instanse of ResponseFormatInterface, response value will be passed throught getFormattedResponse method
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.