Httpful\Response::hasBody PHP Method

hasBody() public method

public hasBody ( ) : boolean
return boolean
    public function hasBody()
    {
        return !empty($this->body);
    }

Usage Example

コード例 #1
0
 protected static function process_response(Response $response)
 {
     if ($response->hasBody()) {
         return $response->body;
     } else {
         throw 'Invalid Response';
     }
 }