Menu

## RestClient
in package

RestClient.php : 9

MercadoPago cURL RestClient

### Table of Contents

$customParams : mixed
$defaultParams : array<string|int, mixed>
$httpRequest : CurlRequest|null
$verbArray : mixed
__construct() : mixed
  RestClient constructor.
delete() : array<string|int, mixed>
get() : array<string|int, mixed>
getHttpRequest() : CurlRequest|null
post() : array<string|int, mixed>
put() : array<string|int, mixed>
setHttpParam() : mixed
setHttpRequest() : mixed
exec() : array<string|int, mixed>
getArrayValue() : bool
setData() : mixed
setHeaders() : mixed

### Properties

#### $customParams

RestClient.php : 30
`protected mixed $customParams = []`

#### $defaultParams

RestClient.php : 29
`protected static array<string|int, mixed> $defaultParams = []`

#### $httpRequest

RestClient.php : 25
`protected CurlRequest|null $httpRequest = null`

#### $verbArray

RestClient.php : 15
`protected static mixed $verbArray = ['get' => 'GET', 'post' => 'POST', 'put' => 'PUT', 'delete' => 'DELETE']`

### Methods

#### __construct()

RestClient.php : 35

RestClient constructor.

`public __construct() : mixed`

##### Return values

mixed —

#### delete()

RestClient.php : 256
`public delete( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>`

##### Parameters

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

##### Tags

throws
  Exception

##### Return values

array<string|int, mixed> —

#### get()

RestClient.php : 220
`public get( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>`

##### Parameters

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

##### Tags

throws
  Exception

##### Return values

array<string|int, mixed> —

#### getHttpRequest()

RestClient.php : 114
`public getHttpRequest() : CurlRequest|null`

##### Return values

CurlRequest|null —

#### post()

RestClient.php : 232
`public post( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>`

##### Parameters

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

##### Tags

throws
  Exception

##### Return values

array<string|int, mixed> —

#### put()

RestClient.php : 244
`public put( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>`

##### Parameters

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

##### Tags

throws
  Exception

##### Return values

array<string|int, mixed> —

#### setHttpParam()

RestClient.php : 265
`public setHttpParam( $param, $value) : mixed`

##### Parameters

$param :
$value :

##### Return values

mixed —

#### setHttpRequest()

RestClient.php : 106
`public setHttpRequest( $request) : mixed`

##### Parameters

$request :

##### Return values

mixed —

#### exec()

RestClient.php : 125
`protected exec( $options) : array<string|int, mixed>`

##### Parameters

$options :

##### Tags

throws
  Exception

##### Return values

array<string|int, mixed> —

#### getArrayValue()

RestClient.php : 276
`protected getArrayValue( $array, $key) : bool`

##### Parameters

$array :
$key :

##### Return values

bool —

#### setData()

RestClient.php : 75
`protected setData(HttpRequest $connect, $data[, string $content_type = '' ]) : mixed`

##### Parameters

$connect : HttpRequest
$data :
$content_type : string = ''

##### Tags

throws
  Exception

##### Return values

mixed —

#### setHeaders()

RestClient.php : 44
`protected setHeaders(HttpRequest $connect, mixed $customHeaders) : mixed`

##### Parameters

$connect : HttpRequest
$customHeaders : mixed

##### Return values

mixed —

## Search results