Пример #1
0
 public function testSetBody()
 {
     $url = 'url';
     $body = 'body';
     $newBody = 'newBody';
     $request = new Request($url, $body);
     $this->assertEquals($body, $request->getBody());
     $request->setBody($newBody);
     $this->assertEquals($newBody, $request->getBody());
 }
Пример #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);
 }