HttpClient
in package
implements
HttpClientInterface
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- delete() : ResponseInterface
- delete request
- get() : ResponseInterface
- Get request
- getPaginated() : PaginatedResponse
- Get request with pagination support
- patch() : ResponseInterface
- Patch request
- post() : ResponseInterface
- Post request
- put() : ResponseInterface
- Put request
- request() : ResponseInterface
- Make an HTTP request
- requestPaginated() : PaginatedResponse
- Make an HTTP request with pagination support
- prepareDefaultOptions() : array<string|int, mixed>
Properties
$client
private
ClientInterface
$client
$logger
private
LoggerInterface
$logger
Methods
__construct()
public
__construct([ClientInterface|null $client = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $client : ClientInterface|null = null
- $logger : LoggerInterface|null = null
delete()
delete request
public
delete(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfaceget()
Get request
public
get(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacegetPaginated()
Get request with pagination support
public
getPaginated(string $url[, array<string|int, mixed> $options = [] ]) : PaginatedResponse
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
PaginatedResponsepatch()
Patch request
public
patch(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacepost()
Post request
public
post(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfaceput()
Put request
public
put(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacerequest()
Make an HTTP request
public
request(string $method, string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $method : string
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacerequestPaginated()
Make an HTTP request with pagination support
public
requestPaginated(string $method, string $url[, array<string|int, mixed> $options = [] ]) : PaginatedResponse
Parameters
- $method : string
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
PaginatedResponseprepareDefaultOptions()
private
prepareDefaultOptions(string &$url, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $url : string
- $options : array<string|int, mixed>