COAR Notify
 
Loading...
Searching...
No Matches
coarnotify\http\HttpLayer Interface Reference
Inheritance diagram for coarnotify\http\HttpLayer:
coarnotify\http\CurlHttpLayer

Public Member Functions

 post (string $url, string $data, ?array $headers=[],... $args)
 
 get (string $url, ?array $headers=[],... $args)
 

Detailed Description

Interface for the HTTP layer

This defines the methods which need to be implemented in order for the client to fully operate

Member Function Documentation

◆ get()

coarnotify\http\HttpLayer::get ( string $url,
?array $headers = [],
... )

Make an HTTP GET request to the supplied URL with the given headers.

Parameters
string$urlThe request URL
array | null$headersHTTP headers as an associative array to include in the request
mixed...$args Argument list to pass on to the implementation
Returns
HttpResponse

Implemented in coarnotify\http\CurlHttpLayer.

◆ post()

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.

Parameters
string$urlThe request URL
string$dataThe body data
array | null$headersHTTP headers as an associative array to include in the request
mixed...$args Argument list to pass on to the implementation
Returns
HttpResponse

Implemented in coarnotify\http\CurlHttpLayer.


The documentation for this interface was generated from the following file: