| 1 |
<?php |
| 2 |
/*! |
| 3 |
* Hybridauth |
| 4 |
* https://hybridauth.github.io | https://github.com/hybridauth/hybridauth |
| 5 |
* (c) 2017 Hybridauth authors | https://hybridauth.github.io/license.html |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace Hybridauth\HttpClient; |
| 9 |
|
| 10 |
/** |
| 11 |
* Hybridauth Http clients interface |
| 12 |
*/ |
| 13 |
interface HttpClientInterface |
| 14 |
{ |
| 15 |
/** |
| 16 |
* Send request to the remote server |
| 17 |
* |
| 18 |
* Returns the result (Raw response from the server) on success, FALSE on failure |
| 19 |
* |
| 20 |
* @param string $uri |
| 21 |
* @param string $method |
| 22 |
* @param array $parameters |
| 23 |
* @param array $headers |
| 24 |
* @param bool $multipart |
| 25 |
* |
| 26 |
* @return mixed |
| 27 |
*/ |
| 28 |
public function request($uri, $method = 'GET', $parameters = [], $headers = [], $multipart = false); |
| 29 |
|
| 30 |
/** |
| 31 |
* Returns raw response from the server on success, FALSE on failure |
| 32 |
* |
| 33 |
* @return mixed |
| 34 |
*/ |
| 35 |
public function getResponseBody(); |
| 36 |
|
| 37 |
/** |
| 38 |
* Retriever the headers returned in the response |
| 39 |
* |
| 40 |
* @return array |
| 41 |
*/ |
| 42 |
public function getResponseHeader(); |
| 43 |
|
| 44 |
/** |
| 45 |
* Returns latest request HTTP status code |
| 46 |
* |
| 47 |
* @return int |
| 48 |
*/ |
| 49 |
public function getResponseHttpCode(); |
| 50 |
|
| 51 |
/** |
| 52 |
* Returns latest error encountered by the client |
| 53 |
* This can be either a code or error message |
| 54 |
* |
| 55 |
* @return mixed |
| 56 |
*/ |
| 57 |
public function getResponseClientError(); |
| 58 |
} |
| 59 |
|