Httpful\Response::hasBody PHP 메소드

hasBody() 공개 메소드

public hasBody ( ) : boolean
리턴 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';
     }
 }