RESTcli
in package
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- RESTcli constructor.
- delete() : string
- Send DELETE request.
- get() : string
- Send GET request.
- init() : void
- Initialize Client.
- post() : string
- Send POST request.
- responseToJsonString() : string
- Convert Response object into json
- update() : string
- Send PUT request.
- isErrorStatus() : bool
Properties
$baseUrl
protected
string
$baseUrl
$client
protected
Client
$client
$ecKey
protected
PrivateKey
$ecKey
$identity
protected
string
$identity
$proxy
protected
string
$proxy
Methods
__construct()
RESTcli constructor.
public
__construct(string $environment, PrivateKey $ecKey[, string|null $proxy = null ]) : mixed
Parameters
- $environment : string
- $ecKey : PrivateKey
- $proxy : string|null = null
Tags
delete()
Send DELETE request.
public
delete( $uri[, array<string|int, mixed>|null $parameters = null ]) : string
Parameters
Tags
Return values
stringget()
Send GET request.
public
get( $uri[, array<string|int, mixed>|null $parameters = null ][, bool $signatureRequired = true ]) : string
Parameters
Tags
Return values
string —(json)
init()
Initialize Client.
public
init() : void
Tags
post()
Send POST request.
public
post( $uri[, array<string|int, mixed> $formData = [] ][, bool $signatureRequired = true ]) : string
Parameters
Tags
Return values
string —(json)
responseToJsonString()
Convert Response object into json
public
responseToJsonString(Response $response) : string
Parameters
- $response : Response
Tags
Return values
stringupdate()
Send PUT request.
public
update( $uri[, array<string|int, mixed> $formData = [] ]) : string
Parameters
Tags
Return values
stringisErrorStatus()
private
isErrorStatus(array<string|int, mixed> $body) : bool
Parameters
- $body : array<string|int, mixed>