HttpClient
class HttpClient implements HttpClientInterface
Http client
Methods
Create and send an http request.
Get adapter
Fetch url
Create and send an GET request.
Create and send an HEAD request.
Create and send an PUT request.
Create and send an DELETE request.
Create and send an POST request.
Create and send an OPTIONS request.
Create and send an PATCH request.
Create and send an TRACE request.
Create and send an CONNECT request.
Details
at line 34
__construct(HttpClientAdapterInterface|null $adapter = null)
Constructor
at line 48
ResponseInterface
request(string $method, string|UriInterface $uri, array $options = [])
Create and send an http request.
at line 58
HttpClientAdapterInterface
getAdapter()
Get adapter
at line 70
string|null
fetch(string $url, array $options = [])
Fetch url
at line 85
ResponseInterface
get(string|UriInterface $uri, array $options = [])
Create and send an GET request.
at line 98
ResponseInterface
head(string|UriInterface $uri, array $options = [])
Create and send an HEAD request.
at line 111
ResponseInterface
put(string|UriInterface $uri, array $options = [])
Create and send an PUT request.
at line 124
ResponseInterface
delete(string|UriInterface $uri, array $options = [])
Create and send an DELETE request.
at line 137
ResponseInterface
post(string|UriInterface $uri, array $options = [])
Create and send an POST request.
at line 150
ResponseInterface
options(string|UriInterface $uri, array $options = [])
Create and send an OPTIONS request.
at line 163
ResponseInterface
patch(string|UriInterface $uri, array $options = [])
Create and send an PATCH request.
at line 176
ResponseInterface
trace(string|UriInterface $uri, array $options = [])
Create and send an TRACE request.
at line 189
ResponseInterface
connect(string|UriInterface $uri, array $options = [])
Create and send an CONNECT request.