Public Member Functions | |
post (string $url, string $data, ?array $headers=[],... $args) | |
get (string $url, ?array $headers=[],... $args) | |
Interface for the HTTP layer
This defines the methods which need to be implemented in order for the client to fully operate
coarnotify\http\HttpLayer::get | ( | string | $url, |
?array | $headers = [], | ||
... ) |
Make an HTTP GET request to the supplied URL with the given headers.
string | $url | The request URL |
array | null | $headers | HTTP headers as an associative array to include in the request |
mixed | ...$args Argument list to pass on to the implementation |
Implemented in coarnotify\http\CurlHttpLayer.
coarnotify\http\HttpLayer::post | ( | string | $url, |
string | $data, | ||
?array | $headers = [], | ||
... ) |
Make an HTTP POST request to the supplied URL with the given body data, and headers.
string | $url | The request URL |
string | $data | The body data |
array | null | $headers | HTTP headers as an associative array to include in the request |
mixed | ...$args Argument list to pass on to the implementation |
Implemented in coarnotify\http\CurlHttpLayer.