From be2485e5d366398943697d8be2dab0b5d25f5a0a Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Tue, 5 Nov 2024 12:24:49 +0100 Subject: [PATCH] clarify how f and follow_redirect interact --- src/http_lwt_client.mli | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http_lwt_client.mli b/src/http_lwt_client.mli index 367eee2..8883c21 100644 --- a/src/http_lwt_client.mli +++ b/src/http_lwt_client.mli @@ -38,6 +38,8 @@ val pp_response : Format.formatter -> response -> unit and returns the response. Each time part of the body is received, [f acc part] is called, with [acc] being the last return value of [f] (or [init] if it is the first time) and [part] being the body part received. + If [follow_redirect] is true (the default), and there's a redirection, [f] + is not called with the (potential) body of the redirection page. By default, up to 5 redirects ([max_redirect]) are followed. If [follow_redirect] is false, no redirect is followed (defaults to true).