RequestSenderInterface
in
Interface RequestSenderInterface
Tags
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
host()
Returns host from the base URL.
public
host() : string
Return values
stringroute()
Returns API routes with base URI prepended.
public
route(string $route) : string
Parameters
- $route : string
Return values
stringsend()
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> = []