|
@@ -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>");
|
|
|
}
|
|
|
...
|