Arikaim CMS

HttpClient
in package
implements HttpClientInterface

Http client

Table of Contents

Interfaces

HttpClientInterface
Http Client Interface

Properties

$adapter  : HttpClientAdapterInterface
Adapter

Methods

__construct()  : mixed
Constructor
connect()  : ResponseInterface
Create and send an CONNECT request.
delete()  : ResponseInterface
Create and send an DELETE request.
fetch()  : mixed|null
Fetch url
get()  : ResponseInterface
Create and send an GET request.
getAdapter()  : HttpClientAdapterInterface
Get adapter
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.
toArray()  : array<string|int, mixed>|null
Convert reponse to array
trace()  : ResponseInterface
Create and send an TRACE request.

Properties

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
ResponseInterface

delete()

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
ResponseInterface

fetch()

Fetch url

public fetch(string|UriInterface $url[, array<string|int, mixed> $options = [] ]) : mixed|null
Parameters
$url : string|UriInterface
$options : array<string|int, mixed> = []
Return values
mixed|null

get()

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
ResponseInterface

head()

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
ResponseInterface

options()

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
ResponseInterface

patch()

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
ResponseInterface

post()

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
ResponseInterface

put()

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
ResponseInterface

request()

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
ResponseInterface

toArray()

Convert reponse to array

public toArray(mixed $response) : array<string|int, mixed>|null
Parameters
$response : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>|null

trace()

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.

Return values
ResponseInterface

        
On this page

Search results