Skip to content

Commit 1f7fed7

Browse files
committed
Add new arg to example
Also, improve example
1 parent 765f96c commit 1f7fed7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ use WpOop\HttpClient\Client;
2020
// Set up the client with WP request options
2121
// https://developer.wordpress.org/reference/classes/wp_http/request/
2222
$client = new Client(
23+
// Default args to WP_Http::request()
2324
[
24-
'redirection' => 2,
25-
'timeout' => 60,
25+
'redirection' => 2,
26+
'timeout' => 60,
2627
],
27-
$responseFactory
28+
$responseFactory,
29+
// Path to proxy file dir to enable response streaming.
30+
// If null, will buffer in memory instead.
31+
get_temp_dir()
2832
);
2933

3034
// Create a PSR-7 request in any way you want, for example via a PSR-17 factory

0 commit comments

Comments
 (0)