Arango PHP ODM

RestClient
in package

RestClient.

Tags
author

Lucas S. Vieira

Table of Contents

Methods

__construct()  : mixed
RestClient constructor.
customHttpRequest()  : ResponseInterface
Makes a custom HTTP request.
delete()  : ResponseInterface
Performs a DELETE request.
get()  : ResponseInterface
Performs a GET request.
patch()  : ResponseInterface
Performs a PATCH request
post()  : ResponseInterface
Performs a POST request.
put()  : mixed|ResponseInterface
Performs a PUT request.

Methods

__construct()

RestClient constructor.

public __construct(string $baseUri[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$baseUri : string

Base URI for all requests.

$options : array<string|int, mixed> = []

Base options for all requests.

Tags
throws
InvalidParameterException

If the base URI is invalid.

customHttpRequest()

Makes a custom HTTP request.

public customHttpRequest(string $method, string $url[, string $body = "" ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$method : string

HTTP method to use.

$url : string

URL to request.

$body : string = ""

Body to be sent.

$headers : array<string|int, mixed> = []

Additional headers.

Tags
throws
GuzzleException
Return values
ResponseInterface

delete()

Performs a DELETE request.

public delete(string $url[, mixed $data = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$url : string

URL to execute request.

$data : mixed = []

Data to send.

$headers : array<string|int, mixed> = []

Additional headers.

Tags
throws
GuzzleException
Return values
ResponseInterface

get()

Performs a GET request.

public get(string $url[, mixed $data = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$url : string

URL to execute request.

$data : mixed = []

Data to send.

$headers : array<string|int, mixed> = []

Additional headers.

Tags
throws
GuzzleException
Return values
ResponseInterface

patch()

Performs a PATCH request

public patch(string $url[, mixed $data = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$url : string

URL to execute request

$data : mixed = []

Data to send

$headers : array<string|int, mixed> = []

Additional headers.

Tags
throws
GuzzleException
Return values
ResponseInterface

post()

Performs a POST request.

public post(string $url[, mixed $data = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$url : string

URL to execute request.

$data : mixed = []

Data to send.

$headers : array<string|int, mixed> = []

Additional headers.

Tags
throws
GuzzleException
Return values
ResponseInterface

put()

Performs a PUT request.

public put(string $url[, mixed $data = [] ][, array<string|int, mixed> $headers = [] ]) : mixed|ResponseInterface
Parameters
$url : string

URL to execute request.

$data : mixed = []

Data to send.

$headers : array<string|int, mixed> = []

Additional headers.

Tags
throws
GuzzleException
Return values
mixed|ResponseInterface

        
On this page

Search results