Skip to content

Commit 0a2ebb8

Browse files
committed
Update stream handling introducing dependency on guzzle, best to remove this if possible
1 parent dd5b509 commit 0a2ebb8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Requests/SwaggerRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace SturentsLib\Api\Requests;
33

4+
use GuzzleHttp\Psr7\Utils;
45
use Psr\Http\Message\RequestInterface;
56
use Psr\Http\Message\StreamInterface;
67
use Psr\Http\Message\UriInterface;
@@ -220,7 +221,7 @@ public function withoutHeader($name) :self{
220221
* @return StreamInterface Returns the body as a stream.
221222
*/
222223
public function getBody() :StreamInterface{
223-
return $this->body;
224+
return Utils::streamFor($this->body);
224225
}
225226

226227
/**

0 commit comments

Comments
 (0)