http_client_adapter
class http_client_adapter implements http_client_interface
Methods
__construct(string $base_uri = '')
No description
set_header(string $key, string $value)
Add a custom header to the request.
set_authorization_bearer(string $token)
Helper to set Bearer Token authorization.
set_content_type(string $content_type)
Set the Content-Type header.
mixed
get(string $uri, array $query = [])
Perform a GET request.
mixed
post(string $uri, array $data = [], bool $as_json = true)
Perform a POST request.
mixed
post_multipart(string $uri, array $data = [])
No description
mixed
put(string $uri, array $data = [])
Perform a PUT request.
mixed
patch(string $uri, array $data = [])
Perform a PATCH request.
mixed
delete(string $uri, array $query = [])
Perform a DELETE request.
Details
at line 33
__construct(string $base_uri = '')
No description
at line 66
http_client_interface
set_header(string $key, string $value)
Add a custom header to the request.
at line 73
http_client_interface
set_authorization_bearer(string $token)
Helper to set Bearer Token authorization.
at line 78
http_client_interface
set_content_type(string $content_type)
Set the Content-Type header.
at line 83
mixed
get(string $uri, array $query = [])
Perform a GET request.
at line 88
mixed
post(string $uri, array $data = [], bool $as_json = true)
Perform a POST request.
at line 95
mixed
post_multipart(string $uri, array $data = [])
No description
at line 103
mixed
put(string $uri, array $data = [])
Perform a PUT request.
at line 108
mixed
patch(string $uri, array $data = [])
Perform a PATCH request.
at line 113
mixed
delete(string $uri, array $query = [])
Perform a DELETE request.