mvaliolahi / http
PHP Http Client
v1.0.0
2020-05-12 09:04 UTC
Requires
Requires (Dev)
- phpunit/phpunit: 6.2
This package is auto-updated.
Last update: 2024-10-12 21:20:05 UTC
README
Http Client / Contract
Install
composer require mvaliolahi/http
1. Instantiate Client
$client = new \Mvaliolahi\Http\Curl();
2. Available methods:
public function get($url, $parameters = null, $headers = [], $options = []); public function post($uri, $parameters, $headers = [], $options = []); public function put($uri, $parameters, $headers = [], $options = []); public function patch($url, $parameters, $headers = [], $options = []); public function delete($uri, $parameters, $headers = [], $options = []); public function errors(); public function code(); public function client($client = null); public function disableSSL($flag) public function originalResponse()
3. Implements new client
Just impelemet the Mvaliolahi\Http\Contracts\HttpClientContract
interface and done!