Pronamic WordPress HTTP

Request

HTTP Request

Tags
author

Remco Tolsma

version
1.0.0
since
1.0.0

Table of Contents

$args  : array<string, mixed>
Request arguments.
$method  : string
Method.
$url  : string
URL to retrieve.
__construct()  : mixed
Construct request.
args()  : array<string, mixed>
Arguments
as_curl()  : string
As cURL.
as_httpie()  : string
AS HTTPie.
body()  : mixed
Body.
from_args()  : self
Create request object from WordPress request arguments array.
headers()  : array<string, string>
Headers.
method()  : string
Method.
url()  : string
URL.

Properties

$args

Request arguments.

private array<string, mixed> $args

$method

Method.

private string $method

$url

URL to retrieve.

private string $url

Methods

__construct()

Construct request.

public __construct(string $method, string $url[, array<string, mixed> $args = array() ]) : mixed
Parameters
$method : string

Method.

$url : string

URL.

$args : array<string, mixed> = array()

Arguments.

Return values
mixed

args()

Arguments

public args() : array<string, mixed>
Return values
array<string, mixed>

body()

Body.

public body() : mixed
Return values
mixed

from_args()

Create request object from WordPress request arguments array.

public static from_args(string $url, array<string, mixed> $args) : self
Parameters
$url : string

URL.

$args : array<string, mixed>

Arguments.

Return values
self

headers()

Headers.

public headers() : array<string, string>
Return values
array<string, string>

method()

Method.

public method() : string
Return values
string

url()

URL.

public url() : string
Return values
string

Search results