Menu

## RESTcli
in package

RESTcli.php : 32

##### Tags

author

  BitPay Integrations integrations@bitpay.com

license

  http://www.opensource.org/licenses/mit-license.php MIT

### Table of Contents

#### Properties

$baseUrl : string
$client : Client
$ecKey : PrivateKey
$identity : string
$proxy : string

#### 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

RESTcli.php : 41
`protected string $baseUrl`

#### $client

RESTcli.php : 37
`protected Client $client`

#### $ecKey

RESTcli.php : 45
`protected PrivateKey $ecKey`

#### $identity

RESTcli.php : 49
`protected string $identity`

#### $proxy

RESTcli.php : 54
`protected string $proxy`

### Methods

#### __construct()

RESTcli.php : 63

RESTcli constructor.

`public __construct(string $environment, PrivateKey $ecKey[, string|null $proxy = null ]) : mixed`

##### Parameters

$environment : string
$ecKey : PrivateKey
$proxy : string|null = null

##### Tags

throws
  BitPayException

#### delete()

RESTcli.php : 246

Send DELETE request.

`public delete( $uri[, array<string|int, mixed>|null $parameters = null ]) : string`

##### Parameters

$uri :
$parameters : array<string|int, mixed>|null = null

##### Tags

throws
  BitPayException

##### Return values

string

#### get()

RESTcli.php : 177

Send GET request.

`public get( $uri[, array<string|int, mixed>|null $parameters = null ][, bool $signatureRequired = true ]) : string`

##### Parameters

$uri :
$parameters : array<string|int, mixed>|null = null
$signatureRequired : bool = true

##### Tags

throws
  BitPayException

##### Return values

string —

(json)

#### init()

RESTcli.php : 76

Initialize Client.

`public init() : void`

##### Tags

throws
  BitPayException

#### post()

RESTcli.php : 111

Send POST request.

`public post( $uri[, array<string|int, mixed> $formData = [] ][, bool $signatureRequired = true ]) : string`

##### Parameters

$uri :
$formData : array<string|int, mixed> = []
$signatureRequired : bool = true

##### Tags

throws
  BitPayException

##### Return values

string —

(json)

#### responseToJsonString()

RESTcli.php : 374

Convert Response object into json

`public responseToJsonString(Response $response) : string`

##### Parameters

$response : Response

##### Tags

throws
  BitPayException
throws
  Exception

##### Return values

string

#### update()

RESTcli.php : 312

Send PUT request.

`public update( $uri[, array<string|int, mixed> $formData = [] ]) : string`

##### Parameters

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

##### Tags

throws
  BitPayException

##### Return values

string

#### isErrorStatus()

RESTcli.php : 438
`private isErrorStatus(array<string|int, mixed> $body) : bool`

##### Parameters

$body : array<string|int, mixed>

##### Return values

bool

## Search results