Set the state of the request
string $state State of the request (complete, sending, or new):
array $context Contextual information about the state change:
Overrides RequestInterface::setState
public function setState($state, array $context = array()) {
$this->state = $state;
if ($this->state == self::STATE_NEW) {
$this->response = null;
}
elseif ($this->state == self::STATE_COMPLETE) {
$this
->processResponse($context);
$this->responseBody = null;
}
return $this;
}