Request
HTTP Request
Tags
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> —as_curl()
As cURL.
public
as_curl() : string
Tags
Return values
string —as_httpie()
AS HTTPie.
public
as_httpie() : string
Tags
Return values
string —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