Send a document as content data using Psr7 stream.

parent fb77742d
......@@ -5,6 +5,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
## [Unreleased]
### Added
- Documents can be sent by providing its contents via Psr7 stream (as opposed to passing a file path).
### Changed
### Deprecated
### Removed
......
......@@ -201,7 +201,7 @@ class Request
//Reformat data array in multipart way if it contains a resource
foreach ($data as $key => $item) {
$has_resource |= is_resource($item);
$has_resource |= (is_resource($item) || $item instanceof \GuzzleHttp\Psr7\Stream);
$multipart[] = ['name' => $key, 'contents' => $item];
}
if ($has_resource) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment