Skip to content

Commit 1d36013

Browse files
committed
Update README
1 parent 8bba34e commit 1d36013

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README-stream.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The `StreamHandle` struct provides direct control over streaming responses. It t
7878
```cpp
7979
// Open a stream (takes ownership of socket)
8080
httplib::Client cli("http://localhost:8080");
81-
auto handle = cli.open_stream("/path");
81+
auto handle = cli.open_stream("GET", "/path");
8282

8383
// Check validity
8484
if (handle.is_valid()) {
@@ -114,6 +114,8 @@ The `httplib.h` header provides a more ergonomic iterator-style API.
114114
#include "httplib.h"
115115
116116
httplib::Client cli("http://localhost:8080");
117+
cli.set_follow_location(true);
118+
...
117119
118120
// Simple GET
119121
auto result = httplib::stream::Get(cli, "/path");

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,8 @@ Process large responses without loading everything into memory.
11951195

11961196
```c++
11971197
httplib::Client cli("localhost", 8080);
1198+
cli.set_follow_location(true);
1199+
...
11981200

11991201
auto result = httplib::stream::Get(cli, "/large-file");
12001202
if (result) {

0 commit comments

Comments
 (0)