Native
class Native extends Client
Properties
bool | $sslVerifyPeer | from Client | |
int | $timeout | from Client | |
bool | $gzipEnabled |
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
__construct()
Constructor
resource
createContext(string $method, array $options, string $body)
Create a stream context for given request
string
decompress(string $content)
Decompress given page if applicable
string[]
generateHeaders(array $options, string $body)
Generate a list of headers for given request
string|bool
request(string $method, string $url, array $options, string $body = '')
Execute an HTTP request
Details
at line 30
string|bool
get(string $url, array $options = [])
Execute a GET request and return the response's body
at line 38
string|bool
post(string $url, array $options = [], string $body = '')
Execute a POST request and return the response's body
at line 22
__construct()
Constructor
at line 51
protected resource
createContext(string $method, array $options, string $body)
Create a stream context for given request
at line 73
protected string
decompress(string $content)
Decompress given page if applicable
at line 90
protected string[]
generateHeaders(array $options, string $body)
Generate a list of headers for given request
at line 111
protected string|bool
request(string $method, string $url, array $options, string $body = '')
Execute an HTTP request