From 31f124a96a2121726f626cafe814bb37accc966e Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 29 Aug 2023 16:27:57 +0100 Subject: API-Rust.md: Tweak the uwr_http_add_header() example Use uwr_get_response_data_size() instead of uwr_get_http_content_len() for the Content-Length, this is more appropriate as this will give the length of the response data rather than the request data. Signed-off-by: Andrew Clayton --- API-Rust.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'API-Rust.md') diff --git a/API-Rust.md b/API-Rust.md index 2ce6e79..565995b 100644 --- a/API-Rust.md +++ b/API-Rust.md @@ -830,7 +830,7 @@ uwr_http_add_header(&ctx, "Content-Type", "text/plain"); uwr_http_add_header( ctx, "Content-Length", - &format!("{}", uwr_get_http_content_len(ctx)), + &format!("{}", uwr_get_response_data_size(ctx)), ); ``` -- cgit