File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Swlib \Saber ;
9
9
10
- use Psr \Http \Message \UriInterface ;
11
- use Swlib \Http \BufferStream ;
12
10
use Swlib \Http \CookiesManagerTrait ;
13
11
use Swlib \Http \Exception \BadResponseException ;
14
12
use Swlib \Http \Exception \ClientException ;
17
15
use Swlib \Http \Exception \TooManyRedirectsException ;
18
16
use Swlib \Util \StringDataParserTrait ;
19
17
use Swlib \Util \SpecialMarkTrait ;
18
+ use function Swlib \Http \stream_for ;
20
19
21
20
class Response extends \Swlib \Http \Response
22
21
{
@@ -96,10 +95,7 @@ function __construct(Request $request)
96
95
} else {
97
96
$ body = '' ;
98
97
}
99
-
100
- $ buffer = new BufferStream ();
101
- $ buffer ->write ($ body );
102
- $ this ->withBody ($ buffer );
98
+ $ this ->withBody (stream_for ($ body ));
103
99
104
100
/** data parser */
105
101
$ this ->__stringDataParserInitialization ($ this ->body );
You can’t perform that action at this time.
0 commit comments