Method |
Description |
|
__construct ( string $url = null, string $method = self::HTTP_POST, array $configs = [] ) |
Default Constructor |
|
addCurlOption ( string $name, mixed $value ) |
Add Curl Option |
|
addHeader ( $name, $value, boolean $overWrite = true ) |
Adds a Header |
|
getCurlOptions ( ) : array |
Gets all curl options |
|
getHeader ( $name ) : string | null |
Get Header by Name |
|
getHeaders ( ) : array |
Gets all Headers |
|
getHttpConstantsFromConfigs ( array $configs = [], $prefix ) : array |
Retrieves an array of constant key, and value based on Prefix |
|
getHttpRetryCount ( ) : integer |
Get Http Retry Counts |
|
getMethod ( ) : string |
Gets Method |
|
getUrl ( ) : null | string |
Gets Url |
|
removeCurlOption ( $name ) |
Removes a curl option from the list |
|
removeHeader ( $name ) |
Removes a Header |
|
setCurlOptions ( $options ) |
Set Curl Options. Overrides all curl options |
|
setHeaders ( array $headers = [] ) |
Set Headers |
|
setHttpProxy ( string $proxy ) |
Set HTTP proxy information |
|
setHttpRetryCount ( integer $retryCount ) |
Set Http Retry Counts |
|
setHttpTimeout ( integer $timeout ) |
Set connection timeout in seconds |
|
setSSLCert ( $certPath, null $passPhrase = null ) |
Set ssl parameters for certificate based client authentication |
|
setUrl ( $url ) |
Sets Url |
|
setUserAgent ( string $userAgentString ) |
Sets the User-Agent string on the HTTP request |
|