class Curl extends Client

Properties

bool $sslVerifyPeer from  Client
int $timeout from  Client
static protected resource $handle

Methods

string|bool
get(string $url, array $options = [])

Execute a GET request and return the response's body

string|bool
post(string $url, array $options = [], string $body = '')

Execute a POST request and return the response's body

resource
getHandle()

Return a globally cached cURL handle, configured for current instance

resource
getNewHandle()

Create and return a new cURL handle

Details

at line 22
string|bool get(string $url, array $options = [])

Execute a GET request and return the response's body

Parameters

string $url

Request URL

array $options

Request options

Return Value

string|bool

Response content or FALSE

at line 39
string|bool post(string $url, array $options = [], string $body = '')

Execute a POST request and return the response's body

Parameters

string $url

Request URL

array $options

Request options

string $body

Request body

Return Value

string|bool

Response content or FALSE

at line 59
protected resource getHandle()

Return a globally cached cURL handle, configured for current instance

Return Value

resource

at line 77
protected resource getNewHandle()

Create and return a new cURL handle

Return Value

resource