Class

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\Guzzle4Driver

class Guzzle4Driver extends GuzzleDriver

Methods

__construct()

Initialize client.

send()

Send the request.

setHost(string $host)

Set request host.

from GuzzleDriver
setResource(string $resource)

Set request resource url.

from GuzzleDriver
setMethod(string $method)

Set request method.

from GuzzleDriver
string getStatusCode()

Get response status code.

from GuzzleDriver
string getStatusMessage()

Get response status message.

from GuzzleDriver
setHeader($header, $value)

Set request header.

from GuzzleDriver
array getHeaders()

Get all response headers.

string getBody()

Get response body.

setBody(string $body)

Set request body.

Details

at line 20
public __construct()

Initialize client.

at line 69
public send()

Send the request.

in GuzzleDriver at line 126
public setHost(string $host)

Set request host.

Parameters

string $host

in GuzzleDriver at line 140
public setResource(string $resource)

Set request resource url.

Parameters

string $resource

in GuzzleDriver at line 150
public setMethod(string $method)

Set request method.

Parameters

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

in GuzzleDriver at line 162
public string getStatusCode()

Get response status code.

Return Value

string

Exceptions

RuntimeException If request hasn't been send already

in GuzzleDriver at line 174
public string getStatusMessage()

Get response status message.

Return Value

string

Exceptions

RuntimeException If request hasn't been send already

in GuzzleDriver at line 184
public setHeader($header, $value)

Set request header.

Parameters

$header
$value

at line 32
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 49
public string getBody()

Get response body.

Return Value

string

Exceptions

RuntimeException If request hasn't been send already

at line 59
public setBody(string $body)

Set request body.

Parameters

string $body