class HttpRequest

Handles HTTP requests

Methods

__construct()

Constructor

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

Creates HTTP request

Details

at line 25
__construct()

Constructor

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

Creates HTTP request

Parameters

string $url Url to send the request
string $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|null|bool