Module: kamailio Branch: master Commit: 3439eb44087b044cb9caaaf8af8df155d6a42bba URL: https://github.com/kamailio/kamailio/commit/3439eb44087b044cb9caaaf8af8df155...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2024-04-09T19:15:32+02:00
nghttp2: docs for nghttp2_reply_header(...) function
---
Modified: src/modules/nghttp2/doc/nghttp2_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/3439eb44087b044cb9caaaf8af8df155... Patch: https://github.com/kamailio/kamailio/commit/3439eb44087b044cb9caaaf8af8df155...
---
diff --git a/src/modules/nghttp2/doc/nghttp2_admin.xml b/src/modules/nghttp2/doc/nghttp2_admin.xml index 4589bc145fe..54cde446de6 100644 --- a/src/modules/nghttp2/doc/nghttp2_admin.xml +++ b/src/modules/nghttp2/doc/nghttp2_admin.xml @@ -129,17 +129,39 @@ end <title>Functions</title> <section id="nghttp2.f.nghttp2_reply"> <title> - <function moreinfo="none">nghttp2_reply(code, reason, ctype, body)</function> + <function moreinfo="none">nghttp2_reply(code, body)</function> </title> <para> - Send back a reply with content-type and body. + Send back a reply with body. The body can be empty string. Both parameters + can contain variables. </para> <example> <title><function>nghttp2_reply</function> usage</title> <programlisting format="linespecific"> ... event_route[nghttp2:request] { - nghttp2_reply("200", "OK", "text/html", + nghttp2_reply("200", + "<html><body>OK</body></html>"); +} +... +</programlisting> + </example> + </section> + <section id="nghttp2.f.nghttp2_reply_header"> + <title> + <function moreinfo="none">nghttp2_reply_header(name, value)</function> + </title> + <para> + Set a header to be added to reply. There can be up to 15 headers. + </para> + <example> + <title><function>nghttp2_reply</function> usage</title> + <programlisting format="linespecific"> +... +event_route[nghttp2:request] { + nghttp2_reply_header("Content-Type", "text/html"); + nghttp2_reply_header("My-Header", "xyz"); + nghttp2_reply("200", "<html><body>OK</body></html>"); } ...