Basicis - Core

Logo

As the name says, it is made to be basic and direct.

View the Project on GitHub basicis/core

Basicis\Http\Client\Client

Client class

Implements:

Psr\Http\Client\ClientInterface

Methods

Name Description
connect Function connect
Instance a Request Interface object with the specified options.  
delete Function delete
Instance a Request Interface object with the specified options.  
get Function get
Instance a Request Interface object with the specified options.  
head Function head
Instance a Request Interface object with the specified options.  
options Function options
Instance a Request Interface object with the specified options.  
path Function path
Instance a Request Interface object with the specified options.  
post Function post
Instance a Request Interface object with the specified options.  
purge Function purge
Instance a Request Interface object with the specified options.  
put Function put
sendRequest Funtion sendRequest
Sends a PSR-7 request and returns a PSR-7 response.  
trace Function trace
Instance a Request Interface object with the specified options.  

Client::connect

Description

public connect (string $uri, array $data)

Function connect Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::delete

Description

public delete (string $uri, array $data)

Function delete Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::get

Description

public get (string $uri, array $data, array $data)

Function get Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::head

Description

public head (string $uri, array $data)

Function head Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::options

Description

public options (string $uri, array $data)

Function options Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::path

Description

public path (string $uri, array $data)

Function path Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::post

Description

public post (string $uri, array $data)

Function post Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::purge

Description

public purge (string $uri, array $data)

Function purge Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::put

Description

public put (string $uri, array $data)

Function put

Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface


Client::sendRequest

Description

public sendRequest (\RequestInterface $request)

Funtion sendRequest Sends a PSR-7 request and returns a PSR-7 response.

Parameters

Return Values

\ResponseInterface

Throws Exceptions

\ClientException

If an error happens while processing the request.


Client::trace

Description

public trace (string $uri, array $data)

Function trace Instance a Request Interface object with the specified options.

Options: $method, $uri, $data, and $options, and returns a ResponseInterface instance.

Parameters

Return Values

\ResponseInterface