From 1d36013fc3aa14f39f5e8071be445e5a75fafff7 Mon Sep 17 00:00:00 2001 From: yhirose Date: Tue, 2 Dec 2025 17:08:53 -0500 Subject: [PATCH] Update README --- README-stream.md | 4 +++- README.md | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README-stream.md b/README-stream.md index ce02e1c..851fd38 100644 --- a/README-stream.md +++ b/README-stream.md @@ -78,7 +78,7 @@ The `StreamHandle` struct provides direct control over streaming responses. It t ```cpp // Open a stream (takes ownership of socket) httplib::Client cli("http://localhost:8080"); -auto handle = cli.open_stream("/path"); +auto handle = cli.open_stream("GET", "/path"); // Check validity if (handle.is_valid()) { @@ -114,6 +114,8 @@ The `httplib.h` header provides a more ergonomic iterator-style API. #include "httplib.h" httplib::Client cli("http://localhost:8080"); +cli.set_follow_location(true); +... // Simple GET auto result = httplib::stream::Get(cli, "/path"); diff --git a/README.md b/README.md index 01eca3e..40ecda0 100644 --- a/README.md +++ b/README.md @@ -1195,6 +1195,8 @@ Process large responses without loading everything into memory. ```c++ httplib::Client cli("localhost", 8080); +cli.set_follow_location(true); +... auto result = httplib::stream::Get(cli, "/large-file"); if (result) {