Class

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver

class BuzzDriver implements DriverInterface

Methods

__construct()

Initialize the request and response.

send()

Send the request.

setHost(string $host)

Set request host.

setResource(string $resource)

Set request resource url.

setMethod(string $method)

Set request method.

string getStatusCode()

Get response status code.

string getStatusMessage()

Get response status message.

setHeader($header, $value)

Set request header.

array getHeaders()

Get all response headers.

string getBody()

Get response body.

setBody(string $body)

Set request body.

Details

at line 37
public __construct()

Initialize the request and response.

at line 72
public send()

Send the request.

at line 90
public setHost(string $host)

Set request host.

Parameters

string $host

at line 104
public setResource(string $resource)

Set request resource url.

Parameters

string $resource

at line 114
public setMethod(string $method)

Set request method.

Parameters

string $method Can be GET, POST, PATCH, ...

at line 130
public string getStatusCode()

Get response status code.

Return Value

string

Exceptions

RuntimeException If request hasn't been send already

at line 142
public string getStatusMessage()

Get response status message.

Return Value

string

Exceptions

RuntimeException If request hasn't been send already

at line 152
public setHeader($header, $value)

Set request header.

Parameters

$header
$value

at line 171
public array getHeaders()

Get all response headers.

Return Value

array Associative array with $header => $value (value can be an array if it hasn't a single value)

Exceptions

RuntimeException If request hasn't been send already

at line 183
public string getBody()

Get response body.

Return Value

string

Exceptions

RuntimeException If request hasn't been send already

at line 193
public setBody(string $body)

Set request body.

Parameters

string $body