There is no license information available for the latest version (2.0.6) of this package.

2.0.6 2023-04-25 09:10 UTC

This package is auto-updated.

Last update: 2024-09-25 12:17:37 UTC


README

is a PHP HTTP client that makes it easy to send HTTP requests

Installing Http

The recommended way to install Http is through Composer.

composer require aqayepardakht/http

How To Use

$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');