From 77a5fa37f1227dec93f2695e54636b1e3703a736 Mon Sep 17 00:00:00 2001 From: Adam Jimerson Date: Mon, 19 Oct 2026 22:54:27 -0400 Subject: [PATCH] feat: Add information about Response.Stream() Add the `Stream()` method to the `Response` interface documenting returning the response body as a `ReadCloser` allowing the response body to be streamed rather than buffered in memory before being returned to the caller. Signed-off-by: Adam Jimerson --- en/digging-deeper/http-client.md | 1 + 1 file changed, 1 insertion(+) diff --git a/en/digging-deeper/http-client.md b/en/digging-deeper/http-client.md index d3d0b84cc..cbd6ee01d 100644 --- a/en/digging-deeper/http-client.md +++ b/en/digging-deeper/http-client.md @@ -64,6 +64,7 @@ type Response interface { Redirect() bool // Check if the response is a redirect (3xx status code) ServerError() bool // Check if the status code is in the 5xx range Status() int // Get the HTTP status code + Stream() (io.ReadCloser, error) // Return a ReadCloser allowing the response body to be streamed Successful() bool // Check if the status code is in the 2xx range /* status code related methods */