Пример #1
0
 public function testGetters()
 {
     $url = 'url';
     $body = 'body';
     $request = new Request($url, $body);
     $this->assertEquals($url, $request->getUrl());
     $this->assertEquals($body, $request->getBody());
     $this->assertEquals(Request::DEFAULT_TYPE, $request->getType());
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function createRequest(Request $request) : RequestInterface
 {
     $settings = ['body' => $request->getBody(), 'query' => $request->getQuery()];
     return $this->guzzleClient->createRequest($request->getType(), $request->getUrl(), $settings);
 }