anourvalar / http-client
HTTP client
Installs: 9 224
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.26
- phpstan/phpstan: ^1.10
- squizlabs/php_codesniffer: ^3.7
- vimeo/psalm: ^5.17
README
Installation
composer require anourvalar/http-client
Usage
API Client (JSON)
$http = new \AnourValar\HttpClient\Http; $http->asJsonClient()->authToken('...')->body(['foo' => 'bar'])->post('https://google')->dump();
Web Browser (Robot)
$http = new \AnourValar\HttpClient\Http; $http->asBrowser()->referer('https://google.com')->get('https://google.com/?start=10')->dump();