HttpAdapter
Tags
Table of Contents
- $_default_options : mixed
- execute() : array<string|int, mixed>
- Performs HTTP request
Properties
$_default_options
private
static mixed
$_default_options
= ['ignore_errors' => true]
Methods
execute()
Performs HTTP request
public
execute(string $method, string $url, string $body, array<string|int, mixed> $headers) : array<string|int, mixed>
Parameters
- $method : string
-
HTTP method to use
- $url : string
-
Fully qualified URL
- $body : string
-
The request body
- $headers : array<string|int, mixed>
-
HTTP headers
Return values
array<string|int, mixed> —The API response as a string and the headers as an array