HttpRequest
Table of Contents
-
$defaultConfig
: mixed
-
$defaultHeaders
: mixed
-
get()
: mixed
-
post()
: mixed
-
execute()
: mixed
-
getHeaders()
: mixed
$defaultConfig
private
static mixed
$defaultConfig
= [CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 3, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_HEADER => true]
private
static mixed
$defaultHeaders
= ['Content-Type: application/json']
get()
public
static get(mixed $url[, mixed $data = [] ][, mixed $headers = [] ]) : mixed
Parameters
-
$url
: mixed
-
-
$data
: mixed
= []
-
-
$headers
: mixed
= []
-
-
throws
-
Error
Return values
mixed
—
post()
public
static post(mixed $url[, mixed $data = [] ][, mixed $headers = [] ]) : mixed
Parameters
-
$url
: mixed
-
-
$data
: mixed
= []
-
-
$headers
: mixed
= []
-
-
throws
-
Error
Return values
mixed
—
execute()
private
static execute(mixed $curl) : mixed
Parameters
-
$curl
: mixed
-
-
throws
-
Error
Return values
mixed
—
private
static getHeaders(mixed $headers) : mixed
Parameters
-
$headers
: mixed
-
Return values
mixed
—