1. Go to this page and download the library: Download aqayepardakht/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/ */
aqayepardakht / http example snippets
$client = new Aqayepardakht\Http\Client();
$client->get('example.com', [
'test' => 'test',
]);
$client->post('example.com', [
'test' => 'test',
]);
// Send Paramas
$client->appendParams([
'test2' => 'test2',
]);
// Append Just One Param
$client->appendParam('key', 'value');
// Empty Params And Set
$client->setParams([
'test4' => 'test4',
'test5' => 'test5'
]);
// Remove Param
$client->delParam('key');
// Empty Headers And Set
$client->setHeaders('key');
// Append Just One Header
$client->appendHeader('key', 'value');
$client->getUrl();
$client->setUrl('example.com');
// Set Bearer Token Header
$client->withToken('token');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.