Phraseanet PHP SDK API
Class

PhraseanetSDK\Exception\BadResponseException

class BadResponseException extends Exception implements ExceptionInterface

Methods

BadResponseException setResponseBody(string $body)

string getResponseBody()

The content of the response

integer getStatusCode()

The response HTTP status code

BadResponseException setHttpStatusCode(integer $httpStatusCode)

Set the response HTTP status code

bool isClientError()

Checks if HTTP Status code is a Client Error (4xx)

bool isServerError()

Checks if HTTP Status code is Server Error (5xx)

static  fromGuzzleResponse(BadResponseException $e)

Details

at line 37
public BadResponseException setResponseBody(string $body)

Parameters

string $body

Return Value

BadResponseException

at line 49
public string getResponseBody()

The content of the response

Return Value

string

at line 59
public integer getStatusCode()

The response HTTP status code

Return Value

integer

at line 70
public BadResponseException setHttpStatusCode(integer $httpStatusCode)

Set the response HTTP status code

Parameters

integer $httpStatusCode

Return Value

BadResponseException

at line 82
public bool isClientError()

Checks if HTTP Status code is a Client Error (4xx)

Return Value

bool

at line 92
public bool isServerError()

Checks if HTTP Status code is Server Error (5xx)

Return Value

bool

at line 97
static public fromGuzzleResponse(BadResponseException $e)

Parameters

BadResponseException $e