ソースを参照

http_client: docs for http_client_response_headers_set()

Daniel-Constantin Mierla 1 年間 前
コミット
b3562c6b10
1 ファイル変更21 行追加0 行削除
  1. 21 0
      src/modules/http_client/doc/http_client_admin.xml

+ 21 - 0
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>