blink\http\Response::content PHP Method

content() public method

Gets the raw response content.
public content ( ) : string
return string
    public function content()
    {
        if (!$this->prepared) {
            $this->prepare();
        }
        return $this->content;
    }

Usage Example

Example #1
0
 /**
  * Returns the response as json.
  *
  * @return mixed
  */
 public function asJson()
 {
     if (!$this->isJsonMessage($this->response->headers)) {
         throw new \RuntimeException('The response is not a valid json response');
     }
     return json_decode($this->response->content(), true);
 }
All Usage Examples Of blink\http\Response::content