diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2023-08-29 16:27:57 +0100 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2023-08-29 16:27:57 +0100 |
commit | 31f124a96a2121726f626cafe814bb37accc966e (patch) | |
tree | e1adb2e7e75cb2501ee66a1f755baf9e5a03c9a6 /API-Rust.md | |
parent | c98d9d80111236b882883eeb8b00f533f1212bef (diff) | |
download | unit-wasm-31f124a96a2121726f626cafe814bb37accc966e.tar.gz unit-wasm-31f124a96a2121726f626cafe814bb37accc966e.tar.bz2 |
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 <a.clayton@nginx.com>
Diffstat (limited to 'API-Rust.md')
-rw-r--r-- | API-Rust.md | 2 |
1 files changed, 1 insertions, 1 deletions
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)), ); ``` |