class HttpRequest (View source)

Handles HTTP requests

Methods

__construct()

No description

static void
setProxySettingsFromEnv()

No description

string|bool|null
create(string $url, RequestMethod $method, bool $returnOnlyStatus = false, mixed $content = null, string $header = '')

Creates HTTP request

Details

__construct()

No description

static void setProxySettingsFromEnv()

No description

Return Value

void

string|bool|null create(string $url, RequestMethod $method, bool $returnOnlyStatus = false, mixed $content = null, string $header = '')

Creates HTTP request

Parameters

string $url

Url to send the request

RequestMethod $method

HTTP request method (GET, POST, PUT, DELETE, etc)

bool $returnOnlyStatus

If set to true, the method would only return response status

mixed $content

Content to be sent with HTTP request

string $header

Header to be set for the HTTP request

Return Value

string|bool|null