From b3562c6b10accec829a15c25fd56e53c8c89a87e Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Sun, 7 Apr 2024 15:50:33 +0200 Subject: [PATCH] http_client: docs for http_client_response_headers_set() --- .../http_client/doc/http_client_admin.xml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/modules/http_client/doc/http_client_admin.xml b/src/modules/http_client/doc/http_client_admin.xml index 6424582074c..0a8f147eb0e 100644 --- a/src/modules/http_client/doc/http_client_admin.xml +++ b/src/modules/http_client/doc/http_client_admin.xml @@ -1026,6 +1026,27 @@ http_client_request_v2pk("GET", "http://api.com/index.php?r_uri=$(ru{s.escape.pa switch ($rc) { ... } +... + + + +
+ + <function moreinfo="none">http_client_response_headers_set(mode)</function> + + + Set if the HTTP response header should be stored (when mode is 1) + or not (when mode is 0). If mode is 0, then it also clears previously + stored response headers. + + + <function>http_client_response_headers_set()</function> usage + +... +http_client_response_headers_set("1"); +http_client_request_v2pk("GET", "http://api.com/index.php?r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escape.param})", + "", "X-Token: abc", "$var(result)"); +xinfo("response header: $httprhdr(X-Header)\n"); ...