HttpClientInterface
in
Http Client Interface
Table of Contents
Methods
- connect() : ResponseInterface
- Create and send an CONNECT request.
- delete() : ResponseInterface
- Create and send an DELETE request.
- fetch() : string|null
- Fetch url
- get() : ResponseInterface
- Create and send an GET request.
- head() : ResponseInterface
- Create and send an HEAD request.
- options() : ResponseInterface
- Create and send an OPTIONS request.
- patch() : ResponseInterface
- Create and send an PATCH request.
- post() : ResponseInterface
- Create and send an POST request.
- put() : ResponseInterface
- Create and send an PUT request.
- request() : ResponseInterface
- Create and send an http request.
- trace() : ResponseInterface
- Create and send an TRACE request.
Methods
connect()
Create and send an CONNECT request.
public
connect(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacedelete()
Create and send an DELETE request.
public
delete(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacefetch()
Fetch url
public
fetch(string $url[, array<string|int, mixed> $options = [] ]) : string|null
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Return values
string|nullget()
Create and send an GET request.
public
get(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacehead()
Create and send an HEAD request.
public
head(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfaceoptions()
Create and send an OPTIONS request.
public
options(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacepatch()
Create and send an PATCH request.
public
patch(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacepost()
Create and send an POST request.
public
post(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfaceput()
Create and send an PUT request.
public
put(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacerequest()
Create and send an http request.
public
request(string $method, string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $method : string
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.
Return values
ResponseInterfacetrace()
Create and send an TRACE request.
public
trace(string|UriInterface $uri[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string|UriInterface
-
URI object or string.
- $options : array<string|int, mixed> = []
-
Request options to apply.