File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff 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)
8080httplib::Client cli ("http://localhost:8080 ");
81- auto handle = cli.open_stream("/path");
81+ auto handle = cli.open_stream("GET", " /path");
8282
8383// Check validity
8484if (handle.is_valid()) {
@@ -114,6 +114,8 @@ The `httplib.h` header provides a more ergonomic iterator-style API.
114114#include "httplib.h"
115115
116116httplib::Client cli("http://localhost:8080");
117+ cli.set_follow_location(true);
118+ ...
117119
118120// Simple GET
119121auto result = httplib::stream::Get(cli, "/path");
Original file line number Diff line number Diff line change @@ -1195,6 +1195,8 @@ Process large responses without loading everything into memory.
11951195
11961196``` c++
11971197httplib::Client cli ("localhost", 8080);
1198+ cli.set_follow_location(true);
1199+ ...
11981200
11991201auto result = httplib::stream::Get(cli, "/large-file");
12001202if (result) {
You can’t perform that action at this time.
0 commit comments