Skip to content

Commit 8423370

Browse files
[7.x] Add toPsrRequest method in Http Client Request (#33016)
* Add toPsrRequest method Allows re-build TransferStats attribute when we use http fake * Update Request.php Co-authored-by: Taylor Otwell <[email protected]>
1 parent f0ad6a9 commit 8423370

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Illuminate/Http/Client/Request.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,16 @@ public function withData(array $data)
244244
return $this;
245245
}
246246

247+
/**
248+
* Get the underlying PSR compliant request instance.
249+
*
250+
* @return \Psr\Http\Message\RequestInterface
251+
*/
252+
public function toPsrRequest()
253+
{
254+
return $this->request;
255+
}
256+
247257
/**
248258
* Determine if the given offset exists.
249259
*

0 commit comments

Comments
 (0)