Method | Description | |
---|---|---|
__clone ( ) | ||
__construct ( ) | ||
__destruct ( ) | ||
delete ( $uri, $params = [], $customHeader = [], $fullResponse = false ) | ||
get ( $uri, $params = [], $customHeader = [], $fullResponse = false ) | ||
head ( $uri, $params = [], $customHeader = [], $fullResponse = false ) | ||
headerFunction ( $ch, $headerLine ) | ||
isAvailable ( ) | ||
patch ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false ) | ||
post ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false ) | ||
put ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false ) | ||
setAuth ( string $user, string $pass, string $auth = 'basic' ) | Setup authentication | |
setConnectTimeout ( $timeout ) | ||
setCookies ( array $cookies ) | Set cookies for this session | |
setOption ( $option, $value ) | ||
setOptions ( $options ) | ||
setProxy ( $host, $port = 8080, $user = null, $pass = null ) | ||
setTimeout ( $timeout ) |
Method | Description | |
---|---|---|
initPostFields ( mixed $params, boolean $useEncoding = true ) : void | Prepare data for a cURL post. | |
send ( array $customHeader = [], boolean $fullResponse = false ) : |
Sends the request and returns the response. |
Method | Description | |
---|---|---|
initOptions ( ) |
public delete ( $uri, $params = [], $customHeader = [], $fullResponse = false ) |
public patch ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false ) |
public post ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false ) |
public put ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false ) |
using custom headers:
$customHeader = array(
0 => 'Accept: text/plain',
1 => 'X-Foo: bar',
2 => 'X-Bar: baz',
);
$response = $this->send($customHeader);
public setCookies ( array $cookies ) | ||
$cookies | array |