Http
HTTP
Tags
Table of Contents
- fake() : void
- Fake.
- get() : Response
- GET.
- head() : Response
- HEAD.
- post() : Response
- POST.
- request() : Response
- Request.
- result() : Response
- Result.
Methods
fake()
Fake.
public
static fake(string $url, string $file) : void
Parameters
- $url : string
-
URL.
- $file : string
-
File with HTTP response.
Return values
void —get()
GET.
public
static get(string $url[, array<string, mixed> $args = array() ]) : Response
Parameters
- $url : string
-
URL.
- $args : array<string, mixed> = array()
-
Arguments.
Tags
Return values
Response —head()
HEAD.
public
static head(string $url[, array<string, mixed> $args = array() ]) : Response
Parameters
- $url : string
-
URL.
- $args : array<string, mixed> = array()
-
Arguments.
Tags
Return values
Response —post()
POST.
public
static post(string $url[, array<string, mixed> $args = array() ]) : Response
Parameters
- $url : string
-
URL.
- $args : array<string, mixed> = array()
-
Arguments.
Tags
Return values
Response —request()
Request.
public
static request(string $url[, array<string, mixed> $args = array() ]) : Response
Parameters
- $url : string
-
URL.
- $args : array<string, mixed> = array()
-
Arguments.
Tags
Return values
Response —result()
Result.
private
static result(array<string|int, string>|WP_Error $result, Handler $handler) : Response
Parameters
- $result : array<string|int, string>|WP_Error
-
Remote request result.
- $handler : Handler
-
Handler.