Property | Type | Description | |
---|---|---|---|
$_curlResponseHeader | array | ||
$_headers | array | ||
$_options | array | ||
$_peek | boolean | ||
$_responseBody | string |
Method | Description | |
---|---|---|
__construct ( array $options = [], array $headers = [] ) | Client constructor. | |
_request ( string $type, string $url, string | array $data, array $headers, array $options ) : integer | ||
delete ( array | string $url, array $headers = [], array $options = [] ) : integer | ||
get ( array | string $url, array $headers = [], array $options = [] ) : integer | ||
getResponseBody ( ) : string | ||
patch ( array | string $url, string | array $data = [], array $headers = [], array $options = [] ) : integer | ||
post ( array | string $url, string | array $data = [], array $headers = [], array $options = [] ) : mixed | ||
put ( array | string $url, string | array $data = [], array $headers = [], array $options = [] ) : integer | ||
setProxy ( string $proxy = '127.0.0.1:8888', boolean $peek = true ) : static |
Method | Description | |
---|---|---|
_buildUrl ( string | array $url ) : string | ||
request ( string $type, string | array $url, string | array $data, array $headers, array $options ) : integer |
public __construct ( array $options = [], array $headers = [] ) | ||
$options | array | - `timeout`: How long should we wait for a response? (integer, seconds, default: 10) - `max_redirects`: How many times should we redirect 3xx before error? (integer, default: 10) (string, default: '') - `proxy`: Proxy details to use for proxy by-passing and authentication (string, default: '') - `ssl_certificates`: Should we verify SSL certificates? Allows passing in a custom certificate file as a string. (Using true uses the system-wide root certificate store instead, but this may have different behaviour across transports.) (string, default: 'xxx/ca.pem') - `verify_host`: Should we verify the common name in the SSL certificate? (bool: default, true) |
$headers | array | - `User-Agent`: User Agent to send to the server (string, default: php-requests/$version) |