\CommuniqueRESTClientRequest

REST Request

This class is used to encapsulate request related data such as method, url, headers etc. Whilst this class is used internally, it is also made available to request interceptors for modification before the request is made.

Summary

Methods
Properties
Constants
__construct()
$method
$url
$payload
$headers
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$method

$method : String

Type

String — The HTTTP method to use for the request. This should be either GET|PUT|POST|DELETE

$url

$url : String

Type

String — The URL to make the request to

$payload

$payload : Mixed

Type

Mixed — The payload of the request

$headers

$headers : Array

Type

Array — Request headers

Methods

__construct()

__construct(String  $method, String  $url, Mixed  $payload, Array  $headers = array()) 

Request object constructor. Request properties should be set here (rather than just setting the object properties directly).

Parameters

String $method

The HTTP method you wish to use for the request

String $url

The URL path to make the request to (relative to the API base path)

Mixed $payload

The payload of the request

Array $headers

Request headers