comparison xml/en/docs/njs/reference.xml @ 2545:dca5a7053a6c

Sorted alphabetically njs http methods.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 19 May 2020 15:05:49 +0100
parents 33347df1da9c
children 6093e9f3615e
comparison
equal deleted inserted replaced
2544:33347df1da9c 2545:dca5a7053a6c
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">
8 8
9 <article name="Reference" 9 <article name="Reference"
10 link="/en/docs/njs/reference.html" 10 link="/en/docs/njs/reference.html"
11 lang="en" 11 lang="en"
12 rev="42"> 12 rev="43">
13 13
14 <section id="summary"> 14 <section id="summary">
15 15
16 <para> 16 <para>
17 <link doc="index.xml">njs</link> provides objects, methods and properties 17 <link doc="index.xml">njs</link> provides objects, methods and properties
137 <tag-name><literal>r.httpVersion</literal></tag-name> 137 <tag-name><literal>r.httpVersion</literal></tag-name>
138 <tag-desc> 138 <tag-desc>
139 HTTP version, read-only 139 HTTP version, read-only
140 </tag-desc> 140 </tag-desc>
141 141
142 <tag-name><literal>r.log(<value>string</value>)</literal></tag-name>
143 <tag-desc>
144 writes a <literal>string</literal> to the error log
145 on the <literal>info</literal> level of logging
146 </tag-desc>
147
148 <tag-name id="r_internal_redirect"><literal>r.internalRedirect(<value>uri</value>)</literal></tag-name> 142 <tag-name id="r_internal_redirect"><literal>r.internalRedirect(<value>uri</value>)</literal></tag-name>
149 <tag-desc> 143 <tag-desc>
150 performs an internal redirect to the specified <literal>uri</literal>. 144 performs an internal redirect to the specified <literal>uri</literal>.
151 If the uri starts with the “<literal>@</literal>” prefix, 145 If the uri starts with the “<literal>@</literal>” prefix,
152 it is considered a named location. 146 it is considered a named location.
153 The actual redirect happens after the handler execution is completed. 147 The actual redirect happens after the handler execution is completed.
148 </tag-desc>
149
150 <tag-name><literal>r.log(<value>string</value>)</literal></tag-name>
151 <tag-desc>
152 writes a <literal>string</literal> to the error log
153 on the <literal>info</literal> level of logging
154 </tag-desc> 154 </tag-desc>
155 155
156 <tag-name><literal>r.method</literal></tag-name> 156 <tag-name><literal>r.method</literal></tag-name>
157 <tag-desc> 157 <tag-desc>
158 HTTP method, read-only 158 HTTP method, read-only
213 <tag-name><literal>r.status</literal></tag-name> 213 <tag-name><literal>r.status</literal></tag-name>
214 <tag-desc> 214 <tag-desc>
215 status, writable 215 status, writable
216 </tag-desc> 216 </tag-desc>
217 217
218 <tag-name id="r_variables"><literal>r.variables{}</literal></tag-name>
219 <tag-desc>
220 nginx variables object,
221 writable (since <link doc="changes.xml" id="njs0.2.8">0.2.8</link>)
222 </tag-desc>
223
224 <tag-name><literal>r.warn(<value>string</value>)</literal></tag-name>
225 <tag-desc>
226 writes a <literal>string</literal> to the error log
227 on the <literal>warning</literal> level of logging
228 </tag-desc>
229
230 <tag-name id="r_uri"><literal>r.uri</literal></tag-name>
231 <tag-desc>
232 current <link doc="../http/ngx_http_core_module.xml" id="var_uri">URI</link>
233 in request,
234 <link doc="../http/ngx_http_core_module.xml" id="location">normalized</link>,
235 read-only
236 </tag-desc>
237
238 <tag-name id="subrequest"><literal>r.subrequest(<value>uri</value>[, 218 <tag-name id="subrequest"><literal>r.subrequest(<value>uri</value>[,
239 <value>options</value>[, <value>callback</value>]])</literal></tag-name> 219 <value>options</value>[, <value>callback</value>]])</literal></tag-name>
240 <tag-desc> 220 <tag-desc>
241 creates a subrequest with the given <literal>uri</literal> and 221 creates a subrequest with the given <literal>uri</literal> and
242 <literal>options</literal>, and installs 222 <literal>options</literal>, and installs
298 Since <link doc="changes.xml" id="njs0.3.8">0.3.8</link>, 278 Since <link doc="changes.xml" id="njs0.3.8">0.3.8</link>,
299 if a <literal>callback</literal> is not provided, 279 if a <literal>callback</literal> is not provided,
300 the <literal>Promise</literal> object 280 the <literal>Promise</literal> object
301 that resolves to the subrequest response object is returned. 281 that resolves to the subrequest response object is returned.
302 </para> 282 </para>
283 </tag-desc>
284
285 <tag-name id="r_uri"><literal>r.uri</literal></tag-name>
286 <tag-desc>
287 current <link doc="../http/ngx_http_core_module.xml" id="var_uri">URI</link>
288 in request,
289 <link doc="../http/ngx_http_core_module.xml" id="location">normalized</link>,
290 read-only
291 </tag-desc>
292
293 <tag-name id="r_variables"><literal>r.variables{}</literal></tag-name>
294 <tag-desc>
295 nginx variables object,
296 writable (since <link doc="changes.xml" id="njs0.2.8">0.2.8</link>)
297 </tag-desc>
298
299 <tag-name><literal>r.warn(<value>string</value>)</literal></tag-name>
300 <tag-desc>
301 writes a <literal>string</literal> to the error log
302 on the <literal>warning</literal> level of logging
303 </tag-desc> 303 </tag-desc>
304 304
305 </list> 305 </list>
306 </para> 306 </para>
307 307