示例#1
0
 public function send(Request $request)
 {
     try {
         return $request->send()->json();
     } catch (GuzzleHttpException $ex) {
         throw SiftHttpException::fromGuzzleException($ex);
     }
 }
示例#2
0
 public function testCreateHttpException()
 {
     $wrapped = new \Guzzle\Http\Exception\CurlException('derp');
     $exception = \Sift\Exception\HttpException::fromGuzzleException($wrapped);
     $this->assertTrue($exception instanceof \Sift\Exception\HttpException);
 }