Skip to content

Commit

Permalink
Allow StreamInterface as raw HTTP Client body (#49705)
Browse files Browse the repository at this point in the history
* Allow StreamInterface as raw HTTP Client body

Since the body payload is passed through to Guzzle, which in turn can
handle Streams as well, this extends the versatility of the HTTP Client

* Update PendingRequest.php

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
janolivermr and taylorotwell authored Jan 16, 2024
1 parent 2e07f30 commit ac7bbd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Client/PendingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class PendingRequest
/**
* The raw body for the request.
*
* @var string
* @var \Psr\Http\Message\StreamInterface|string
*/
protected $pendingBody;

Expand Down Expand Up @@ -259,7 +259,7 @@ public function baseUrl(string $url)
/**
* Attach a raw body to the request.
*
* @param string $content
* @param \Psr\Http\Message\StreamInterface|string $content
* @param string $contentType
* @return $this
*/
Expand Down

0 comments on commit ac7bbd3

Please sign in to comment.