Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function formatResponse(ResponseInterface $response)
 {
     return array('protocol_version' => $response->getProtocolVersion(), 'status_code' => $response->getStatusCode(), 'reason_phrase' => $response->getReasonPhrase(), 'headers' => $response->getHeaders(), 'body' => (string) $response->getBody(), 'parameters' => $response->getParameters());
 }
 /**
  * Gets an array from a Response.
  *
  * @param ResponseInterface $response
  *
  * @return array
  */
 public function responseToArray(ResponseInterface $response)
 {
     return ['status_code' => $response->getStatusCode(), 'protocol_version' => $response->getProtocolVersion(), 'headers' => $response->getHeaders(), 'body' => (string) $response->getBody(), 'parameters' => $response->getParameters()];
 }