RetailCRM API Client

RequestSenderInterface

Interface RequestSenderInterface

Tags
category

RequestTransformerInterface

Table of Contents

Methods

host()  : string
Returns host from the base URL.
route()  : string
Returns API routes with base URI prepended.
send()  : array<int|string, mixed>
Sends request to provided route with provided method and body, returns array response.

Methods

route()

Returns API routes with base URI prepended.

public route(string $route) : string
Parameters
$route : string
Return values
string

send()

Sends request to provided route with provided method and body, returns array response.

public send(string $method, string $route[, array<int|string, mixed> $requestForm = [] ]) : array<int|string, mixed>

Request will be put into GET parameters or into POST form-data (depends on method).

Note: do not remove "useless" exceptions which are marked as "never thrown" by IDE. PSR-18's ClientInterface doesn't have them in the DocBlock, but, according to PSR-18, they can be thrown by clients, and therefore should be present here.

Parameters
$method : string
$route : string
$requestForm : array<int|string, mixed> = []
Tags
see
https://www.php-fig.org/psr/psr-18/#error-handling
throws
ApiException
throws
ClientException
throws
HandlerException
throws
ApiExceptionInterface
Return values
array<int|string, mixed>

        
On this page

Search results