Свойство | Тип | Описание | |
---|---|---|---|
$authentication | |||
$cookies | |||
$curl | |||
$restart |
Метод | Описание | |
---|---|---|
__construct ( boolean $restart = false, integer $timeout = 10 ) | Creates a new HTTP client based on cURL. | |
__destruct ( ) | Closes the underlying cURL handle. | |
delete ( String $location, $body = null ) : |
Executes a DELETE on a resource. | |
execute ( String $method, String $location ) : |
Executes a Curl. | |
get ( String $location ) : |
GETs a resource. | |
post ( String $location, String $body ) : |
Executes a POST on a location. | |
put ( String $location, String $body ) : |
PUTs a resource. | |
restart ( ) | Reinitializes the client for a completely new session. | |
setAuthentication ( String $credentials ) | Sets the authentication string for the next HTTP requests. | |
setHeader ( type $header, type $value ) | Sets an HTTP header to send within the request. | |
setTimeout ( integer $timeout ) | Sets a timeout for the current cURL handler's requests. |
Метод | Описание | |
---|---|---|
createCurlHandle ( ) : resource | Creates and initializes the underlying cURL handle. | |
getDefaultCurlOptions ( ) : array | Returns an array with a set of default options for cURL. | |
getRequestCookies ( ) : string | Returns a string with the list of cookies for the Cookie header. |
public __construct ( boolean $restart = false, integer $timeout = 10 ) | ||
$restart | boolean | |
$timeout | integer |
protected createCurlHandle ( ) : resource | ||
Результат | resource |
public delete ( String $location, $body = null ) : |
||
$location | String | |
Результат |
public execute ( String $method, String $location ) : |
||
$method | String | |
$location | String | |
Результат |
public get ( String $location ) : |
||
$location | String | |
Результат |
protected getDefaultCurlOptions ( ) : array | ||
Результат | array |
protected getRequestCookies ( ) : string | ||
Результат | string |
public post ( String $location, String $body ) : |
||
$location | String | |
$body | String | |
Результат |
public put ( String $location, String $body ) : |
||
$location | String | |
$body | String | |
Результат |
public setAuthentication ( String $credentials ) | ||
$credentials | String |
public setHeader ( type $header, type $value ) | ||
$header | type | |
$value | type |
public setTimeout ( integer $timeout ) | ||
$timeout | integer |