Module: kamailio
Branch: master
Commit: b3562c6b10accec829a15c25fd56e53c8c89a87e
URL: 
https://github.com/kamailio/kamailio/commit/b3562c6b10accec829a15c25fd56e53c8c89a87e

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-04-07T15:50:33+02:00

http_client: docs for http_client_response_headers_set()

---

Modified: src/modules/http_client/doc/http_client_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/b3562c6b10accec829a15c25fd56e53c8c89a87e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b3562c6b10accec829a15c25fd56e53c8c89a87e.patch

---

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) {
     ...
 }
+...
+                               </programlisting>
+                       </example>
+               </section>
+               <section id="http_client.f.http_client_response_headers_set">
+                       <title>
+                               <function 
moreinfo="none">http_client_response_headers_set(mode)</function>
+                       </title>
+                       <para>
+                               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.
+                       </para>
+                       <example>
+                               
<title><function>http_client_response_headers_set()</function> usage</title>
+                               <programlisting format="linespecific">
+...
+http_client_response_headers_set("1");
+http_client_request_v2pk("GET", 
"http://api.com/index.php?r_uri=$(ru{s.escape.param})&amp;f_uri=$(fu{s.escape.param})",
+          "", "X-Token: abc", "$var(result)");
+xinfo("response header: $httprhdr(X-Header)\n");
 ...
                                </programlisting>
                        </example>

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to