Class RestHttp
HTTP client used communication with platform Should not be used directly,
instead use domain patterns Requests can be monitored via NGS\Client\RestHttp::addSubscriber()
public
|
#
__construct( string $service, string $username = null, string $password = null )
Creates new client instance |
public
|
|
public
|
|
public
|
|
public static
|
|
public
mixed
|
#
sendRequest( string $uriSegment, string $method = 'GET', null $body = null, array $expectedCode = null, string $accept = 'application/json' )
Sends http request |
public static
|
|
public
|
|
public
|
|
protected
|
string |
EVENT_REQUEST_BEFORE
|
'request.before' |
|
string |
EVENT_REQUEST_SENT
|
'request.sent' |
|
string |
EVENT_REQUEST_ERROR
|
'request.error' |
protected
array
|
$subscribers | array() |
|
protected
string
|
$service | |
|
protected
string
|
$username | |
|
protected
string
|
$auth | |
#
Authentication string |
protected
mixed
|
$certPath | |
|
protected
array
|
$lastResponse | |
|
protected static
|
$instance | |
#
Singleton instance |