Mercurial > hg > nginx-site
annotate xml/ru/docs/njs/reference.xml @ 2838:2a4bd6782451
Updated with Netcraft March 2022 Web Server Survey stats.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 04 Apr 2022 18:34:46 +0100 |
parents | 7da360f50017 |
children |
rev | line source |
---|---|
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
2 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
3 <!-- |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
5 --> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
6 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
8 |
2246
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
9 <article name="Справочник" |
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
10 link="/ru/docs/njs/reference.html" |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
11 lang="ru" |
2631
7da360f50017
Unified spelling of "utf-8" in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2630
diff
changeset
|
12 rev="59"> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
13 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
14 <section id="summary"> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
15 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
16 <para> |
2244
467aef18bf12
Renamed the "About njs" page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2189
diff
changeset
|
17 <link doc="index.xml">njs</link> предоставляет объекты, методы и свойства |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
18 для расширения функциональности nginx. |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
19 </para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
20 |
2569
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
21 <para> |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
22 Справочник содержит описания методов, свойств и модулей, |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
23 доступных только в njs и не соответствующих стандарту ECMAScript. |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
24 Описания методов и свойств njs, |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
25 соответствующих стандарту, доступны в |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
26 <link url="http://www.ecma-international.org/ecma-262/">спецификации |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
27 ECMAScript</link>. |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
28 Список всех методов и свойств njs доступен в разделе |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
29 <link doc="compatibility.xml">Совместимость</link>. |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
30 </para> |
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
31 |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
32 </section> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
33 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
34 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
35 <section id="http_stream" name="Объекты nginx"> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
36 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
37 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
38 <section id="http" name="HTTP-запрос"> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
39 |
2189
23cfb62121d1
Mentioned byte strings for njs HTTP and stream objects.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2182
diff
changeset
|
40 <para> |
23cfb62121d1
Mentioned byte strings for njs HTTP and stream objects.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2182
diff
changeset
|
41 Объект <literal>HTTP</literal> доступен только в |
23cfb62121d1
Mentioned byte strings for njs HTTP and stream objects.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2182
diff
changeset
|
42 модуле <link doc="../http/ngx_http_js_module.xml">ngx_http_js_module</link>. |
23cfb62121d1
Mentioned byte strings for njs HTTP and stream objects.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2182
diff
changeset
|
43 Все строки в объекте <literal>HTTP</literal> являются |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
44 <link id="string">байтовыми строками</link>. |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
45 |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
46 <list type="tag"> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
47 |
2353 | 48 <tag-name id="r_args"><literal>r.args{}</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
49 <tag-desc> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
50 объект аргументов запроса, только чтение |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
51 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
52 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
53 <tag-name id="r_error"><literal>r.error(<value>строка</value>)</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
54 <tag-desc> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
55 записывает <literal>строку</literal> в лог-файл ошибок |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
56 на уровне лога <literal>error</literal> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
57 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
58 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
59 <tag-name id="r_finish"><literal>r.finish()</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
60 <tag-desc> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
61 завершает отправку ответа клиенту |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
62 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
63 |
2353 | 64 <tag-name id="r_headers_in"><literal>r.headersIn{}</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
65 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
66 объект входящих заголовков, только чтение. |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
67 <para> |
2543
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
68 Доступ к заголовку запроса <literal>Foo</literal> |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
69 можно получить при помощи синтаксиса: |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
70 <literal>headersIn.foo</literal> или <literal>headersIn['Foo']</literal>. |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
71 </para> |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
72 |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
73 <para> |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
74 Заголовки запроса |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
75 <header>Authorization</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
76 <header>Content-Length</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
77 <header>Content-Range</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
78 <header>Content-Type</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
79 <header>ETag</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
80 <header>Expect</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
81 <header>From</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
82 <header>Host</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
83 <header>If-Match</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
84 <header>If-Modified-Since</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
85 <header>If-None-Match</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
86 <header>If-Range</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
87 <header>If-Unmodified-Since</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
88 <header>Max-Forwards</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
89 <header>Proxy-Authorization</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
90 <header>Referer</header>, |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
91 <header>Transfer-Encoding</header> и |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
92 <header>User-Agent</header> |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
93 могут иметь только одно значение поля |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
94 (<link doc="changes.xml" id="njs0.4.1">0.4.1</link>). |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
95 Дубликаты значений поля в заголовке запроса <header>Cookie</header> |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
96 разделяются точкой с запятой (<literal>;</literal>). |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
97 Дубликаты значений поля во всех остальных заголовках запроса |
f39c4724c0f8
Described multi-value headers in r.headersIn.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2537
diff
changeset
|
98 разделяются запятой. |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
99 </para> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
100 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
101 |
2353 | 102 <tag-name id="r_headers_out"><literal>r.headersOut{}</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
103 <tag-desc> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
104 объект исходящих заголовков, доступно для записи. |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
105 <para> |
2532
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
106 Доступ к заголовку ответа <literal>Foo</literal> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
107 можно получить при помощи синтаксиса: |
2544
33347df1da9c
Relocated sentence in r.headers.Out, added dot, corrected quotes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2543
diff
changeset
|
108 <literal>headersOut.foo</literal> или <literal>headersOut['Foo']</literal>. |
2532
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
109 </para> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
110 |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
111 <para> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
112 Значения полей многозначных заголовков ответа |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
113 (<link doc="changes.xml" id="njs0.4.0">0.4.0</link>) |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
114 можно задать при помощи синтаксиса: |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
115 <example> |
2544
33347df1da9c
Relocated sentence in r.headers.Out, added dot, corrected quotes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2543
diff
changeset
|
116 r.headersOut['Foo'] = ['a', 'b'] |
2532
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
117 </example> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
118 результат: |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
119 <example> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
120 Foo: a |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
121 Foo: b |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
122 </example> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
123 Все предыдущие значения поля заголовка ответа <header>Foo</header> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
124 будут удалены. |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
125 </para> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
126 |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
127 <para> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
128 В стандартных заголовках ответа, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
129 поля которых могут принимать только одно значение, например |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
130 <header>Content-Type</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
131 учитывается только последний элемент массива. |
2544
33347df1da9c
Relocated sentence in r.headers.Out, added dot, corrected quotes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2543
diff
changeset
|
132 Значения поля в заголовке ответа <header>Set-Cookie</header> |
33347df1da9c
Relocated sentence in r.headers.Out, added dot, corrected quotes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2543
diff
changeset
|
133 всегда возвращаются в виде массива. |
2532
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
134 Дубликаты значений поля в заголовках ответа |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
135 <header>Age</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
136 <header>Content-Encoding</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
137 <header>Content-Length</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
138 <header>Content-Type</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
139 <header>ETag</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
140 <header>Expires</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
141 <header>Last-Modified</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
142 <header>Location</header>, |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
143 <header>Retry-After</header> |
423d813dc8bb
Documented support for multi-value headers in r.headersOut.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2525
diff
changeset
|
144 игнорируются. |
2537
d6bbfd20c82f
Rephrased a sentence in r.headersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2532
diff
changeset
|
145 Дубликаты значений поля в других заголовках ответов |
d6bbfd20c82f
Rephrased a sentence in r.headersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2532
diff
changeset
|
146 разделяются при помощи запятой. |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
147 </para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
148 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
149 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
150 <tag-name id="r_http_version"><literal>r.httpVersion</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
151 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
152 версия HTTP, только чтение |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
153 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
154 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
155 <tag-name id="r_internal_redirect"><literal>r.internalRedirect(<value>uri</value>)</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
156 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
157 осуществляет внутреннее перенаправление на указанный <literal>uri</literal>. |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
158 Если uri начинается с префикса “<literal>@</literal>”, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
159 то он считается именованным location. |
2525
6ce28e0beec0
Updated description of r.internalRedirect in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2484
diff
changeset
|
160 Перенаправление осуществляется после завершения выполнения обработчика. |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
161 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
162 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
163 <tag-name id="r_log"><literal>r.log(<value>строка</value>)</literal></tag-name> |
2545
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
164 <tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
165 записывает <literal>строку</literal> в лог-файл ошибок |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
166 на уровне лога <literal>info</literal> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
167 </tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
168 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
169 <tag-name id="r_method"><literal>r.method</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
170 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
171 HTTP метод, только чтение |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
172 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
173 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
174 <tag-name id="r_parent"><literal>r.parent</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
175 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
176 ссылается на родительский объект запроса |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
177 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
178 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
179 <tag-name id="r_remote_address"><literal>r.remoteAddress</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
180 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
181 адрес клиента, только чтение |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
182 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
183 |
2546
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
184 <tag-name id="r_raw_headers_in"><literal>r.rawHeadersIn{}</literal></tag-name> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
185 <tag-desc> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
186 возвращает массив пар ключей и значений |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
187 таким же, каким он был получен от клиента |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
188 (<link doc="changes.xml" id="njs0.4.1">0.4.1</link>). |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
189 <para> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
190 Например для следующих заголовков запроса: |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
191 <example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
192 Host: localhost |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
193 Foo: bar |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
194 foo: bar2 |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
195 </example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
196 результат <literal>r.rawHeadersIn</literal>: |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
197 <example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
198 [ |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
199 ['Host', 'localhost'], |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
200 ['Foo', 'bar'], |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
201 ['foo', 'bar2'] |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
202 ] |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
203 </example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
204 Значения полей всех заголовков <literal>foo</literal> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
205 можно получить при помощи синтаксиса: |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
206 <example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
207 r.rawHeadersIn.filter(v=>v[0].toLowerCase() == 'foo').map(v=>v[1]) |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
208 </example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
209 результат: |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
210 <example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
211 ['bar', 'bar2'] |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
212 </example> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
213 Имена полей заголовков не приводятся к нижнему регистру, |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
214 дубликаты значений поля не объединяются. |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
215 </para> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
216 </tag-desc> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
217 |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
218 <tag-name id="r_raw_headers_out"><literal>r.rawHeadersOut{}</literal></tag-name> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
219 <tag-desc> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
220 возвращает массив пар ключей и значений заголовков ответа |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
221 (<link doc="changes.xml" id="njs0.4.1">0.4.1</link>). |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
222 Имена полей заголовков не приводятся к нижнему регистру, |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
223 дубликаты значений поля не объединяются. |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
224 </tag-desc> |
6093e9f3615e
Documented rawHeadersIn and rawHeadersOut in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2545
diff
changeset
|
225 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
226 <tag-name id="r_request_body"><literal>r.requestBody</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
227 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
228 возвращает тело запроса клиента, если оно не было |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
229 записано во временный файл. |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
230 Чтобы убедиться, что тело запроса клиента находится в памяти, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
231 его размер должен быть ограничен |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
232 <link doc="../http/ngx_http_core_module.xml" id="client_max_body_size"/>, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
233 и также необходимо установить достаточный размер буфера при помощи |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
234 <link doc="../http/ngx_http_core_module.xml" id="client_body_buffer_size"/>. |
2356
ea6964391d52
Clarified usage of r.requestBody in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2353
diff
changeset
|
235 Свойство доступно только в директиве |
ea6964391d52
Clarified usage of r.requestBody in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2353
diff
changeset
|
236 <link doc="../http/ngx_http_js_module.xml" id="js_content"/>. |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
237 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
238 |
2353 | 239 <tag-name id="r_response_body"><literal>r.responseBody</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
240 <tag-desc> |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
241 хранит тело ответа <link id="r_subrequest">подзапроса</link>, только чтение. |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
242 Размер <literal>r.responseBody</literal> ограничивается директивой |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
243 <link doc="../http/ngx_http_core_module.xml" id="subrequest_output_buffer_size"/>. |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
244 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
245 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
246 <tag-name id="r_return"><literal>r.return(код[, строка])</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
247 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
248 отправляет |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
249 клиенту полный ответ с указанным <literal>кодом</literal> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
250 <para> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
251 Можно задать или URL перенаправления |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
252 (для кодов 301, 302, 303, 307 и 308), |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
253 или текст тела ответа (для остальных кодов) в качестве второго аргумента |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
254 </para> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
255 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
256 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
257 <tag-name id="r_send"><literal>r.send(<value>строка</value>)</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
258 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
259 отправляет часть тела ответа клиенту |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
260 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
261 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
262 <tag-name id="r_send_header"><literal>r.sendHeader()</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
263 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
264 отправляет заголовки HTTP клиенту |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
265 </tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
266 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
267 <tag-name id="r_status"><literal>r.status</literal></tag-name> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
268 <tag-desc> |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
269 статус, доступно для записи |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
270 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
271 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
272 <tag-name id="r_subrequest"><literal>r.subrequest(<value>uri</value>[, |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
273 <value>options</value>[, <value>callback</value>]])</literal></tag-name> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
274 <tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
275 создаёт подзапрос с заданными <literal>uri</literal> и |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
276 <literal>options</literal> и устанавливает |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
277 необязательный <literal>callback</literal> завершения. |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
278 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
279 <para> |
2340
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
280 <link doc="../dev/development_guide.xml.xml" id="http_subrequests">Подзапрос</link> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
281 использует входящие заголовки клиентского запроса. |
2340
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
282 Для отправки на проксируемый сервер заголовков, отличных от оригинальных, |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
283 может использоваться директива |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
284 <link doc="../http/ngx_http_proxy_module.xml" id="proxy_set_header"/>. |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
285 Для отправки на проксируемый сервер нового набора заголовков |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
286 может использоваться директива |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
287 <link doc="../http/ngx_http_proxy_module.xml" id="proxy_pass_request_headers"/>. |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
288 </para> |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
289 |
537130c40c1f
Updated r.subrequest desctiption in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2338
diff
changeset
|
290 <para> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
291 Если <literal>options</literal> является строкой, то в ней |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
292 содержится срока аргументов подзапроса. |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
293 В противном случае ожидается, что <literal>options</literal> является |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
294 объектом со следующими ключами: |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
295 <list type="tag"> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
296 <tag-name><literal>args</literal></tag-name> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
297 <tag-desc> |
2344
ea8ccaac18b4
Added default values for r.subrequest options in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2340
diff
changeset
|
298 строка с аргументами, по умолчанию используется пустая строка |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
299 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
300 <tag-name><literal>body</literal></tag-name> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
301 <tag-desc> |
2344
ea8ccaac18b4
Added default values for r.subrequest options in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2340
diff
changeset
|
302 тело запроса, |
ea8ccaac18b4
Added default values for r.subrequest options in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2340
diff
changeset
|
303 по умолчанию используется тело запроса родительского объекта запроса |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
304 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
305 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
306 <tag-name><literal>method</literal></tag-name> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
307 <tag-desc> |
2344
ea8ccaac18b4
Added default values for r.subrequest options in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2340
diff
changeset
|
308 метод HTTP, по умолчанию используется метод <literal>GET</literal> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
309 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
310 |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
311 <tag-name><literal>detached</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
312 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
313 логический флаг (<link doc="changes.xml" id="njs0.3.9">0.3.9</link>), |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
314 если <literal>true</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
315 то создаваемый подзапрос является независимым подзапросом. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
316 Ответы на независимые подзапросы игнорируются. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
317 В отличие от обычных подзапросов независимый подзапрос |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
318 можно создать внутри обработчика переменной. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
319 Флаг <literal>detached</literal> и аргумент <literal>callback</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
320 являются взаимоисключающими. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
321 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
322 |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
323 </list> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
324 </para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
325 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
326 <para> |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
327 <literal>callback</literal> получает |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
328 объект ответа подзапроса с методами и свойствами, |
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
329 идентичными родительскому объекту запроса. |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
330 </para> |
2484
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
331 |
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
332 <para> |
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
333 Начиная с версии njs <link doc="changes.xml" id="njs0.3.8">0.3.8</link> |
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
334 если не указан <literal>callback</literal>, |
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
335 то возвращается объект <literal>Promise</literal>, |
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
336 который разрешается в объект ответа подзапроса. |
2aa02672d54f
Added a note to r.subrequest in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2455
diff
changeset
|
337 </para> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
338 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
339 |
2545
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
340 <tag-name id="r_uri"><literal>r.uri</literal></tag-name> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
341 <tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
342 текущий <link doc="../http/ngx_http_core_module.xml" id="var_uri">URI</link> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
343 запроса в |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
344 <link doc="../http/ngx_http_core_module.xml" id="location">нормализованном</link> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
345 виде, только чтение |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
346 </tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
347 |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
348 <tag-name id="r_variables"><literal>r.variables{}</literal></tag-name> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
349 <tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
350 объект переменных nginx, доступно для записи |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
351 (начиная с версии <link doc="changes.xml" id="njs0.2.8">0.2.8</link>) |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
352 </tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
353 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
354 <tag-name id="r_warn"><literal>r.warn(<value>строка</value>)</literal></tag-name> |
2545
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
355 <tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
356 записывает <literal>строку</literal> в лог-файл ошибок |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
357 на уровне лога <literal>warning</literal> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
358 </tag-desc> |
dca5a7053a6c
Sorted alphabetically njs http methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2544
diff
changeset
|
359 |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
360 </list> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
361 </para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
362 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
363 </section> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
364 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
365 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
366 <section id="stream" name="Stream-сессия"> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
367 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
368 <para> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
369 Объект stream-сессии доступен только в |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
370 модуле |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
371 <link doc="../stream/ngx_stream_js_module.xml">ngx_stream_js_module</link>. |
2189
23cfb62121d1
Mentioned byte strings for njs HTTP and stream objects.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2182
diff
changeset
|
372 Все строки в объекте <literal>stream</literal> являются |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
373 <link id="string">байтовыми строками</link>. |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
374 </para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
375 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
376 <para> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
377 <list type="tag"> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
378 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
379 <tag-name id="s_allow"><literal>s.allow()</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
380 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
381 успешно финализирует обработчик фазы |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
382 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>) |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
383 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
384 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
385 <tag-name id="s_decline"><literal>s.decline()</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
386 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
387 финализирует обработчик фазы и передаёт контроль следующему обработчику |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
388 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>) |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
389 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
390 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
391 <tag-name id="s_deny"><literal>s.deny()</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
392 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
393 финализирует обработчик фазы с кодом ошибки доступа |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
394 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>) |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
395 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
396 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
397 <tag-name id="s_done"><literal>s.done</literal>(<value>[код]</value>)</tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
398 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
399 успешно финализирует текущий обработчик фазы |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
400 или финализирует его с указанным числовым кодом |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
401 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>). |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
402 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
403 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
404 <tag-name id="s_error"><literal>s.error(<value>строка</value>)</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
405 <tag-desc> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
406 записывает отправленную <literal>строку</literal> в лог-файл ошибок |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
407 на уровне лога <literal>error</literal> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
408 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
409 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
410 <tag-name id="s_log"><literal>s.log(<value>строка</value>)</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
411 <tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
412 записывает отправленную <value>строку</value> в лог-файл ошибок |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
413 на уровне лога <literal>info</literal> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
414 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
415 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
416 <tag-name id="s_off"><literal>s.off(<value>имяСобытия</value>)</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
417 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
418 отменяет регистрацию callback'а, установленного методом |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
419 <link id="s_on">s.on()</link> |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
420 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>) |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
421 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
422 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
423 <tag-name id="s_on"><literal>s.on(<value>событие</value>, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
424 <value>callback</value>)</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
425 <tag-desc> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
426 регистрирует <literal>callback</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
427 для указанного <literal>события</literal> |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
428 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>). |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
429 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
430 <para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
431 <literal>Событием</literal> может являться одна из следующих строк: |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
432 <list type="tag"> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
433 <tag-name><literal>upload</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
434 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
435 новые данные от клиента |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
436 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
437 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
438 <tag-name><literal>download</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
439 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
440 новые данные к клиенту |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
441 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
442 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
443 </list> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
444 </para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
445 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
446 <para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
447 Callback завершения имеет следующий прототип: |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
448 <literal>callback(данные, флаги)</literal>, где |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
449 <literal>данные</literal> являются строкой, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
450 <literal>флаги</literal> являются объектом |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
451 со следующими свойствами: |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
452 <list type="tag"> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
453 <tag-name id="s_on_callback_last"><literal>last</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
454 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
455 логическое свойство, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
456 true, если данные являются последним буфером. |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
457 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
458 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
459 </list> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
460 </para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
461 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
462 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
463 <tag-name id="s_remote_address"><literal>s.remoteAddress</literal></tag-name> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
464 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
465 адрес клиента, только чтение |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
466 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
467 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
468 <tag-name id="s_send"><literal>s.send(<value>данные</value>[, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
469 <value>параметры</value>])</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
470 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
471 отправляет данные клиенту |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
472 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>). |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
473 <literal>Параметры</literal> являются объектом, используемым |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
474 для переопределения флагов буфера nginx, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
475 полученных из буфера входных данных. |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
476 Флаги могут быть переопределены при помощи следующих флагов: |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
477 <para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
478 <list type="tag"> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
479 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
480 <tag-name><literal>last</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
481 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
482 логическое свойство, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
483 true, если буфер является последним буфером |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
484 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
485 |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
486 <tag-name><literal>flush</literal></tag-name> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
487 <tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
488 логическое свойство, |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
489 true, если буфер должен иметь флаг <literal>flush</literal> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
490 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
491 </list> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
492 </para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
493 Метод может быть вызван несколько раз в течение одного вызова callback'a. |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
494 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
495 |
2338
39ac205f90b7
Documented that r.variables{} and s.variables{} are writable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2337
diff
changeset
|
496 <tag-name id="s_variables"><literal>s.variables{}</literal></tag-name> |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
497 <tag-desc> |
2338
39ac205f90b7
Documented that r.variables{} and s.variables{} are writable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2337
diff
changeset
|
498 объект переменных nginx, доступно для записи |
39ac205f90b7
Documented that r.variables{} and s.variables{} are writable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2337
diff
changeset
|
499 (начиная с версии <link doc="changes.xml" id="njs0.2.8">0.2.8</link>) |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
500 </tag-desc> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
501 |
2570
44792f1ee284
Added IDs to methods in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2569
diff
changeset
|
502 <tag-name id="s_warn"><literal>s.warn(<value>строка</value>)</literal></tag-name> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
503 <tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
504 записывает отправленную <literal>строку</literal> в лог-файл ошибок |
2182
7865ca0da0ab
Merged HTTP request,response, and reply in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2175
diff
changeset
|
505 на уровне лога <literal>warning</literal> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
506 </tag-desc> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
507 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
508 </list> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
509 </para> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
510 |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
511 </section> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
512 |
2295
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
513 </section> |
a1d0238ffb61
Updated HTTP and stream objects in Russian njs reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2290
diff
changeset
|
514 |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
515 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
516 <section id="core" name="Core"> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
517 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
518 |
2405
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
519 <section id="core_global" name="Global"> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
520 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
521 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
522 <section id="process" name="Process"> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
523 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
524 <para> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
525 Объект <literal>process</literal> является глобальным объектом, |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
526 предоставляющим информацию о текущем процессе |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
527 (<link doc="changes.xml" id="njs0.3.3">0.3.3</link>). |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
528 </para> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
529 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
530 <para> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
531 <list type="tag"> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
532 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
533 <tag-name id="process_argv"><literal>process.argv</literal></tag-name> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
534 <tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
535 Возвращает массив, содержащий аргументы командной строки, |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
536 передаваемые в момент запуска текущего процесса. |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
537 </tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
538 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
539 <tag-name id="process_env"><literal>process.env</literal></tag-name> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
540 <tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
541 Возвращает объект, содержащий переменные окружения пользователя. |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
542 <note> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
543 По умолчанию nginx удаляет все переменные окружения, унаследованные |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
544 от своего родительского процесса, кроме переменной TZ. |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
545 Для сохранения части унаследованных переменных |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
546 необходимо использовать директиву <link doc="../ngx_core_module.xml" id="env"/>. |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
547 </note> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
548 </tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
549 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
550 <tag-name id="process_pid"><literal>process.pid</literal></tag-name> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
551 <tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
552 Возвращает PID текущего процесса. |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
553 </tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
554 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
555 <tag-name id="process_ppid"><literal>process.ppid</literal></tag-name> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
556 <tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
557 Возвращает PID текущего родительского процесса. |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
558 </tag-desc> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
559 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
560 </list> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
561 </para> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
562 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
563 </section> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
564 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
565 </section> |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
566 |
dbf68c949522
Documented the "process" global object.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2356
diff
changeset
|
567 |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
568 <section id="string" name="String"> |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
569 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
570 <para> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
571 В njs существует два типа строк: строка Unicode (по умолчанию) и |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
572 байтовая строка. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
573 </para> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
574 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
575 <para> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
576 Строка Unicode соответствует строке ECMAScript, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
577 содержащей символы Unicode. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
578 </para> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
579 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
580 <para> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
581 Байтовые строки содержат последовательность байт и |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
582 используются для сериализации строк Unicode |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
583 во внешние данные и десериализации из внешних источников. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
584 Например метод <link id="string_toutf8">toUTF8()</link> сериализует |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
585 строку Unicode в байтовую строку используя кодировку UTF8: |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
586 <example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
587 >> '£'.toUTF8().toString('hex') |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
588 'c2a3' /* C2 A3 является UTF8-представлением codepoint 00A3 ('£') */ |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
589 </example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
590 Метод <link id="string_tobytes">toBytes()</link> сериализует |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
591 строку Unicode с codepoints до 255 в байтовую строку, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
592 в противном случае возвращается <literal>null</literal>: |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
593 <example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
594 >> '£'.toBytes().toString('hex') |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
595 'a3' /* a3 является байтом, равным codepoint 00A3 ('£') */ |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
596 </example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
597 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
598 <list type="tag"> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
599 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
600 <tag-name id="string_bytesfrom"><literal>String.bytesFrom(<value>массив</value> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
601 | <value>строка</value>, <value>кодировка</value>)</literal></tag-name> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
602 <tag-desc> |
2569
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
603 Создаёт байтовую строку или из массива, содержащего октеты, |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
604 или из кодированной строки |
2337
867fe207f13e
Updated links to changes.xml in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2332
diff
changeset
|
605 (<link doc="changes.xml" id="njs0.2.3">0.2.3</link>). |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
606 Кодировкой может быть |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
607 <literal>hex</literal>, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
608 <literal>base64</literal> и |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
609 <literal>base64url</literal>. |
2605
0ec1e1b063d7
Deprecated String.bytesFrom method in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2604
diff
changeset
|
610 Метод устарел начиная с |
0ec1e1b063d7
Deprecated String.bytesFrom method in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2604
diff
changeset
|
611 <link doc="changes.xml" id="njs0.4.4">0.4.4</link>, |
0ec1e1b063d7
Deprecated String.bytesFrom method in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2604
diff
changeset
|
612 вместо него следует использовать метод <literal>Buffer.from</literal>: |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
613 <example> |
2605
0ec1e1b063d7
Deprecated String.bytesFrom method in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2604
diff
changeset
|
614 >> Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]).toString() |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
615 'buffer' |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
616 |
2605
0ec1e1b063d7
Deprecated String.bytesFrom method in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2604
diff
changeset
|
617 >> Buffer.from('YnVmZmVy', 'base64').toString() |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
618 'buffer' |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
619 </example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
620 </tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
621 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
622 <tag-name id="string_frombytes"><literal>String.prototype.fromBytes(<value>начало</value>[, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
623 <value>конец</value>])</literal></tag-name> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
624 <tag-desc> |
2569
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
625 Возвращает новую строку Unicode из байтовой строки, |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
626 в которой каждый байт заменяется соответствующей Unicode codepoint. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
627 </tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
628 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
629 <tag-name id="string_fromutf8"><literal>String.prototype.fromUTF8(<value>начало</value>[, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
630 <value>конец</value>])</literal></tag-name> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
631 <tag-desc> |
2569
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
632 Преобразует байтовую строку, содержащую валидную строку UTF8, |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
633 в строку Unicode, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
634 иначе возвращается <literal>null</literal>. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
635 </tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
636 |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
637 <tag-name id="string_tobytes"><literal>String.prototype.toBytes(<value>начало</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
638 <value>конец</value>])</literal></tag-name> |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
639 <tag-desc> |
2569
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
640 Сериализует строку Unicode в байтовую строку. |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
641 Возвращает <literal>null</literal>, если в строке найден символ больше, чем 255. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
642 </tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
643 |
2582
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
644 <tag-name id="string_tostring"><literal>String.prototype.toString(<value>кодировка</value>)</literal></tag-name> |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
645 <tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
646 <para> |
2582
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
647 Кодирует указанную строку в |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
648 <literal>hex</literal>, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
649 <literal>base64</literal> или |
2582
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
650 <literal>base64url</literal>: |
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
651 <example> |
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
652 >> 'αβγδ'.toString('base64url') |
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
653 'zrHOss6zzrQ' |
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
654 </example> |
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
655 До версии <link doc="changes.xml" id="njs0.4.3">0.4.3</link> |
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
656 могла быть кодирована только <link id="string_tobytes">байтовая строка</link>: |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
657 <example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
658 >> 'αβγδ'.toUTF8().toString('base64url') |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
659 'zrHOss6zzrQ' |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
660 </example> |
2582
e162a71453b0
Improved String.prototype.toString() for ordinary strings in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2580
diff
changeset
|
661 </para> |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
662 </tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
663 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
664 <tag-name id="string_toutf8"><literal>String.prototype.toUTF8(<value>начало</value>[, |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
665 <value>конец</value>])</literal></tag-name> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
666 <tag-desc> |
2569
2edc64c05b0e
Removed ECMAScript methods from njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2546
diff
changeset
|
667 Сериализует строку Unicode |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
668 в байтовую строку при помощи кодирования UTF8. |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
669 <example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
670 >> 'αβγδ'.toUTF8().length |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
671 8 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
672 >> 'αβγδ'.length |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
673 4 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
674 </example> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
675 </tag-desc> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
676 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
677 </list> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
678 </para> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
679 |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
680 </section> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
681 |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
682 |
2585
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
683 <section id="textdecoder" name="Text Decoder"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
684 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
685 <para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
686 Объект <literal>TextDecoder</literal> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
687 создаёт поток кодовых точек из потока данных |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
688 (<link doc="changes.xml" id="njs0.4.3">0.4.3</link>). |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
689 </para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
690 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
691 <para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
692 <list type="tag"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
693 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
694 <tag-name><literal>TextDecoder([[<value>кодировка</value>], |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
695 <value>options</value>])</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
696 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
697 Создаёт новый объект <literal>TextDecoder</literal> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
698 для указанной <literal>кодировки</literal>, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
699 на данный момент поддерживается только UTF-8. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
700 Параметр <literal>options</literal> является |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
701 словарём <literal>TextDecoderOption</literal> со свойствами: |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
702 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
703 <list type="tag"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
704 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
705 <tag-name><literal>fatal</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
706 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
707 логический флаг, указывающий, что |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
708 <link id="textdecoder_decode"><literal>TextDecoder.decode()</literal></link> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
709 должен вызывать исключение <value>TypeError</value> в случае, если |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
710 найдена ошибка кодирования, по умолчанию <literal>false</literal>. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
711 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
712 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
713 </list> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
714 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
715 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
716 <tag-name id="textdecoder_encoding"><literal>TextDecoder.prototype.encoding</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
717 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
718 Возвращает строку с именем кодировки, используемой |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
719 <link id="textdecoder"><literal>TextDecoder()</literal></link>, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
720 только чтение. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
721 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
722 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
723 <tag-name id="textdecoder_fatal"><literal>TextDecoder.prototype.fatal</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
724 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
725 логический флаг, <literal>true</literal>, если |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
726 генерируется ошибка для невалидных символов, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
727 только чтение. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
728 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
729 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
730 <tag-name id="textdecoder_ignorebom"><literal>TextDecoder.prototype.ignoreBOM</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
731 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
732 логический флаг, <literal>true</literal>, если |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
733 игнорируется маркер порядка следования байтов, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
734 только чтение. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
735 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
736 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
737 <tag-name id="textdecoder_decode"><literal>TextDecoder.prototype.decode(<value>буфер</value>, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
738 [<value>options</value>])</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
739 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
740 Возвращает строку с текстом, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
741 декодированным из <literal>буфера</literal> при помощи |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
742 <link id="textdecoder"><literal>TextDecoder()</literal></link>. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
743 Буфером может быть |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
744 <literal>ArrayBuffer</literal>. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
745 Параметром <literal>options</literal> является |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
746 словарь <literal>TextDecodeOptions</literal> со свойствами: |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
747 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
748 <list type="tag"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
749 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
750 <tag-name><literal>stream</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
751 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
752 логический флаг, указывающий, что |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
753 при последующих вызовах <literal>decode()</literal> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
754 должны последовать дополнительные данные: |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
755 <literal>true</literal>, если данные обрабатываются блоками, и |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
756 <literal>false</literal> для последнего блока |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
757 или если данные не передаются блоками. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
758 По умолчанию <literal>false</literal>. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
759 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
760 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
761 </list> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
762 <example> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
763 >> (new TextDecoder()).decode(new Uint8Array([206,177,206,178])) |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
764 αβ |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
765 </example> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
766 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
767 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
768 </list> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
769 </para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
770 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
771 </section> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
772 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
773 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
774 <section id="textencoder" name="Text Encoder"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
775 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
776 <para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
777 Объект <literal>TextEncoder</literal> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
778 создаёт поток данных в кодировке UTF-8 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
779 из потока кодовых точек |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
780 (<link doc="changes.xml" id="njs0.4.3">0.4.3</link>). |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
781 </para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
782 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
783 <para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
784 <list type="tag"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
785 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
786 <tag-name><literal>TextEncoder()</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
787 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
788 Возвращает только что созданный <literal>TextEncoder</literal>, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
789 который создаёт поток данных в кодировке UTF-8. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
790 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
791 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
792 <tag-name id="textencoder_encode"><literal>TextEncoder.prototype.encode(<value>строка</value>)</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
793 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
794 Кодирует <literal>строку</literal> в <literal>Uint8Array</literal>, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
795 содержащий текст в кодировке UTF-8. |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
796 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
797 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
798 <tag-name id="textencoder_encodeinto"><literal>TextEncoder.prototype.encodeInto(<value>строка</value>, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
799 <value>uint8Array</value>)</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
800 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
801 Преобразует <literal>строку</literal> в UTF-8, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
802 сохраняет результат в целевом <literal>Uint8Array</literal> и |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
803 возвращает объект словаря, отражающий прогресс кодирования, со свойствами: |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
804 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
805 <list type="tag"> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
806 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
807 <tag-name><literal>read</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
808 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
809 количество блоков кода UTF-16 из исходной строки, |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
810 преобразованных в UTF-8 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
811 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
812 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
813 <tag-name><literal>written</literal></tag-name> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
814 <tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
815 количество байтов, преобразованных в целевом <literal>Uint8Array</literal> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
816 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
817 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
818 </list> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
819 </tag-desc> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
820 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
821 </list> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
822 </para> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
823 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
824 </section> |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
825 |
7035221dbe37
Documented TextDecoder and TextEncoder in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2583
diff
changeset
|
826 |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
827 <section id="njs_api_timers" name="Timers"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
828 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
829 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
830 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
831 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
832 <tag-name id="cleartimeout"><literal>clearTimeout(<value>timeout</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
833 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
834 Отменяет объект <literal>timeout</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
835 созданный <link id="settimeout"><literal>setTimeout()</literal></link>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
836 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
837 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
838 <tag-name id="settimeout"><literal>setTimeout(<value>функция</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
839 <value>миллисекунды</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
840 <value>аргумент1</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
841 <value>аргументN</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
842 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
843 Вызывает <literal>функцию</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
844 по прошествии указанного количества <literal>миллисекунд</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
845 Указанной функции можно передать |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
846 один или более необязательных <literal>аргументов</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
847 Возвращает объект <literal>timeout</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
848 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
849 function handler(v) |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
850 { |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
851 // ... |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
852 } |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
853 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
854 t = setTimeout(handler, 12); |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
855 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
856 // ... |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
857 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
858 clearTimeout(t); |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
859 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
860 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
861 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
862 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
863 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
864 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
865 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
866 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
867 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
868 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
869 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
870 <section id="built-in" name="Встроенные модули"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
871 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
872 <section id="crypto" name="Crypto"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
873 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
874 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
875 Модуль Crypto предоставляет поддержку криптографических функций. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
876 Объект модуля Crypto доступен через <literal>require('crypto')</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
877 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
878 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
879 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
880 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
881 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
882 <tag-name id="crypto_createhash"><literal>crypto.createHash(<value>алгоритм</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
883 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
884 Создаёт и возвращает объект <link id="crypto_hash">Hash</link>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
885 который может использоваться для создания hash digests |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
886 при помощи указанного <value>алгоритма</value>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
887 Алгоритмом может быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
888 <literal>md5</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
889 <literal>sha1</literal> и |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
890 <literal>sha256</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
891 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
892 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
893 <tag-name id="crypto_createhmac"><literal>crypto.createHmac(<value>алгоритм</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
894 <value>секретный ключ</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
895 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
896 Создаёт и возвращает объект <link id="crypto_hmac">HMAC</link>, который |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
897 использует заданный <value>алгоритм</value> и <value>секретный ключ</value>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
898 Алгоритм может быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
899 <literal>md5</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
900 <literal>sha1</literal> и |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
901 <literal>sha256</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
902 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
903 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
904 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
905 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
906 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
907 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
908 <section id="crypto_hash" name="Hash"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
909 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
910 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
911 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
912 |
2602
90b32c2c0155
Fixed typo and versions mismatch in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2585
diff
changeset
|
913 <tag-name id="crypto_hash_update"><literal>hash.update(<value>данные</value>)</literal></tag-name> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
914 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
915 Обновляет содержимое хэша с передаваемыми <value>данными</value>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
916 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
917 |
2602
90b32c2c0155
Fixed typo and versions mismatch in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2585
diff
changeset
|
918 <tag-name id="crypto_hash_digest"><literal>hash.digest([<value>кодировка</value>])</literal></tag-name> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
919 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
920 Подсчитывает дайджест всех данных, передаваемых при помощи |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
921 <literal>hash.update()</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
922 Кодировка может быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
923 <literal>hex</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
924 <literal>base64</literal> и |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
925 <literal>base64url</literal>. |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
926 Если кодировка не указана, то будет возвращен объект буфера |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
927 (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>). |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
928 <note> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
929 До версии <link doc="changes.xml" id="njs0.4.4">0.4.4</link> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
930 вместо объекта буфера возвращалась байтовая строка. |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
931 </note> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
932 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
933 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
934 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
935 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
936 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
937 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
938 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
939 >> var cr = require('crypto') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
940 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
941 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
942 >> cr.createHash('sha1').update('A').update('B').digest('base64url') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
943 'BtlFlCqiamG-GMPiK_GbvKjdK10' |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
944 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
945 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
946 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
947 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
948 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
949 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
950 <section id="crypto_hmac" name="HMAC"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
951 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
952 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
953 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
954 |
2602
90b32c2c0155
Fixed typo and versions mismatch in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2585
diff
changeset
|
955 <tag-name id="crypto_hmac_update"><literal>hmac.update(<value>данные</value>)</literal></tag-name> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
956 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
957 Обновляет содержимое HMAC с передаваемыми <value>данными</value>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
958 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
959 |
2602
90b32c2c0155
Fixed typo and versions mismatch in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2585
diff
changeset
|
960 <tag-name id="crypto_hmac_digest"><literal>hmac.digest([<value>кодировка</value>])</literal></tag-name> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
961 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
962 Подсчитывает HMAC-дайджест всех данных, передаваемых при помощи |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
963 <literal>hmac.update()</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
964 Кодировка может быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
965 <literal>hex</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
966 <literal>base64</literal> и |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
967 <literal>base64url</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
968 Если кодировка не указана, то будет возвращена байтовая строка. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
969 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
970 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
971 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
972 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
973 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
974 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
975 >> var cr = require('crypto') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
976 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
977 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
978 >> cr.createHmac('sha1', 'secret.key').update('AB').digest('base64url') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
979 'Oglm93xn23_MkiaEq_e9u8zk374' |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
980 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
981 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
982 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
983 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
984 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
985 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
986 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
987 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
988 <section id="njs_api_fs" name="File System"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
989 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
990 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
991 Модуль File System предоставляет набор функций для операций с файлами. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
992 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
993 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
994 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
995 Объект модуля доступен через <literal>require('fs')</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
996 Начиная с версии <link doc="changes.xml" id="njs0.3.9">0.3.9</link> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
997 доступны промисифицированные версии методов file system через |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
998 объект <literal>require('fs').promises</literal>: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
999 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1000 > var fs = require('fs').promises; |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1001 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1002 > fs.readFile("/file/path").then((data)=>console.log(data)) |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1003 <file data> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1004 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1005 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1006 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1007 <tag-name id="fs_accesssync"><literal>accessSync(<value>путь</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1008 <value>mode</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1009 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1010 Синхронно проверяет разрешения для файла или каталога, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1011 указанного в <literal>пути</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1012 (<link doc="changes.xml" id="njs0.3.9">0.3.9</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1013 Если проверка не удалась, то будет возвращена ошибка, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1014 в противном случае метод возвратит undefined. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1015 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1016 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1017 <tag-name><literal>mode</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1018 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1019 По умолчанию |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1020 <link id="access_const"><literal>fs.constants.F_OK</literal></link>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1021 Является необязательным числом, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1022 которое задаёт выполнение проверок доступа. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1023 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1024 try { |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1025 fs.accessSync('/file/path', fs.constants.R_OK | fs.constants.W_OK); |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1026 console.log('has access'); |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1027 } catch (e) { |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1028 console.log('no access');) |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1029 } |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1030 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1031 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1032 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1033 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1034 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1035 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1036 <tag-name id="fs_appendfilesync"><literal>appendFileSync(<value>имяФайла</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1037 <value>данные</value>[, <value>options</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1038 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1039 Синхронно добавляет указанные <literal>данные</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1040 в файл с указанным <literal>именем</literal>. |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1041 <literal>Данными</literal> могут быть строка |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1042 или объект буфера (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>. |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1043 Если файл не существует, то он будет создан. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1044 Параметр <literal>options</literal> должен быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1045 объектом со следующими ключами: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1046 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1047 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1048 <tag-name><literal>режим</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1049 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1050 режим, по умолчанию <literal>0o666</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1051 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1052 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1053 <tag-name><literal>флаг</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1054 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1055 <link id="njs_api_fs_flags">флаг</link> файловой системы, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1056 по умолчанию <literal>a</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1057 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1058 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1059 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1060 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1061 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1062 <tag-name id="fs_mkdirsync"><literal>mkdirSync(<value>путь</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1063 <value>options</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1064 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1065 Синхронно создаёт каталог по указанному <literal>пути</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1066 (<link doc="changes.xml" id="njs0.4.2">0.4.2</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1067 Параметр <literal>options</literal> должен быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1068 <literal>числом</literal>, которое задаёт |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1069 <link id="fs_mkdirsync_mode">режим</link>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1070 или объектом с ключами: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1071 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1072 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1073 <tag-name id="fs_mkdirsync_mode"><literal>режим</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1074 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1075 режим, по умолчанию <literal>0o777</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1076 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1077 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1078 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1079 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1080 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1081 <tag-name id="fs_readdirsync"><literal>readdirSync(<value>путь</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1082 <value>options</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1083 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1084 Синхронно читает содержимое каталога |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1085 по указанному <literal>пути</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1086 (<link doc="changes.xml" id="njs0.4.2">0.4.2</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1087 Параметр <literal>options</literal> должен быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1088 строкой, определяющей <link id="fs_readdirsync_encoding">кодировку</link> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1089 или объектом с ключами: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1090 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1091 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1092 <tag-name id="fs_readdirsync_encoding"><literal>кодировка</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1093 <tag-desc> |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1094 кодировка, по умолчанию <literal>utf8</literal>. |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1095 Кодировка может быть <literal>utf8</literal> и <literal>буфер</literal> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1096 (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>). |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1097 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1098 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1099 <tag-name id="fs_readdirsync_withfiletypes"><literal>withFileTypes</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1100 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1101 если <literal>true</literal>, то массив файлов будет содержать |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1102 объекты <link id="fs_dirent"><literal>fs.Dirent</literal></link>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1103 по умолчанию <literal>false</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1104 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1105 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1106 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1107 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1108 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1109 <tag-name id="fs_readfilesync"><literal>readFileSync(<value>имяФайла</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1110 <value>options</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1111 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1112 Синхронно возвращает содержимое файла |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1113 с указанным <literal>именем</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1114 Параметр <literal>options</literal> хранит |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1115 <literal>строку</literal>, которая задаёт кодировку. |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1116 Если кодировка указана, то будет возвращена строка, |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1117 иначе будет возвращён объект буфера |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1118 (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>). |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1119 <note> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1120 До версии <link doc="changes.xml" id="njs0.4.4">0.4.4</link> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1121 возвращалась <link id="string_tobytes">байтовая строка</link> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1122 в случае, если не была указана кодировка. |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1123 </note> |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1124 Иначе ожидается, что <literal>options</literal> является |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1125 объектом с ключами: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1126 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1127 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1128 <tag-name><literal>кодировка</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1129 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1130 кодировка, по умолчанию не указана. |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1131 Кодировка может быть <literal>utf8</literal>, |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1132 <literal>hex</literal> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1133 (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>), |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1134 <literal>base64</literal> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1135 (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>), |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1136 <literal>base64url</literal> |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1137 (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>). |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1138 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1139 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1140 <tag-name><literal>флаг</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1141 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1142 <link id="njs_api_fs_flags">флаг</link> файловой системы, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1143 по умолчанию <literal>r</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1144 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1145 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1146 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1147 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1148 >> var fs = require('fs') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1149 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1150 >> var file = fs.readFileSync('/file/path.tar.gz') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1151 undefined |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1152 >> var gzipped = file.slice(0,2).toString('hex') === '1f8b'; gzipped |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1153 true |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1154 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1155 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1156 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1157 <tag-name id="fs_realpathsync"><literal>realpathSync(<value>путь</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1158 <value>options</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1159 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1160 Синхронно вычисляет канонический путь при помощи преобразования |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1161 <literal>.</literal>, <literal>..</literal> и символических ссылок используя |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1162 <link url="http://man7.org/linux/man-pages/man3/realpath.3.html">realpath(3)</link>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1163 Аргумент <literal>options</literal> может быть строкой, определяющей кодировку, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1164 или объектом со свойством encoding, определяющим символьную кодировку, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1165 которая используется для передачи пути обратному вызову |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1166 (<link doc="changes.xml" id="njs0.3.9">0.3.9</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1167 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1168 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1169 <tag-name id="fs_renamesync"><literal>renameSync(<value>старыйПуть</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1170 <value>новыйПуть</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1171 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1172 Синхронно меняет имя или местоположение файла. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1173 (<link doc="changes.xml" id="njs0.3.4">0.3.4</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1174 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1175 >> var fs = require('fs') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1176 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1177 >> var file = fs.renameSync('hello.txt', 'HelloWorld.txt') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1178 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1179 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1180 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1181 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1182 <tag-name id="fs_rmdirsync"><literal>rmdirSync(<value>путь</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1183 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1184 Синхронно удаляет каталог по указанному <literal>пути</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1185 (<link doc="changes.xml" id="njs0.4.2">0.4.2</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1186 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1187 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1188 <tag-name id="fs_symlinksync"><literal>symlinkSync(<value>цель</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1189 <value>path</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1190 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1191 Синхронно создаёт ссылку с именем <literal>путь</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1192 указывающую на <literal>цель</literal> при помощи |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1193 <link url="http://man7.org/linux/man-pages/man2/symlink.2.html">symlink(2)</link> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1194 (<link doc="changes.xml" id="njs0.3.9">0.3.9</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1195 Относительные цели считаются относительно корневого каталога ссылки. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1196 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1197 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1198 <tag-name id="fs_unlinksync"><literal>unlinkSync(<value>путь</value>)</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1199 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1200 Синхронно удаляет файл по указанному <literal>пути</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1201 (<link doc="changes.xml" id="njs0.3.9">0.3.9</link>). |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1202 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1203 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1204 <tag-name id="fs_writefilesync"><literal>writeFileSync(<value>имяФайла</value>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1205 <value>данные</value>[, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1206 <value>options</value>])</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1207 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1208 Синхронно записывает <literal>данные</literal> в файл |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1209 с указанным <literal>именем</literal>. |
2604
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1210 <literal>Данными</literal> могут быть строка |
a29676472a11
Added Buffer object info to some njs methods.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2602
diff
changeset
|
1211 или объект буфера (<link doc="changes.xml" id="njs0.4.4">0.4.4</link>. |
2580
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1212 Если файл не существует, то он будет создан. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1213 Если файл существует, то он будет заменён. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1214 Параметр <literal>options</literal> должен быть |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1215 объектом с ключами: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1216 <list type="tag"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1217 <tag-name><literal>режим</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1218 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1219 режим, по умолчанию <literal>0o666</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1220 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1221 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1222 <tag-name><literal>флаг</literal></tag-name> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1223 <tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1224 <link id="njs_api_fs_flags">флаг</link> файловой системы, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1225 по умолчанию <literal>w</literal> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1226 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1227 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1228 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1229 <example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1230 >> var fs = require('fs') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1231 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1232 >> var file = fs.writeFileSync('hello.txt', 'Hello world') |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1233 undefined |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1234 </example> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1235 </tag-desc> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1236 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1237 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1238 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1239 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1240 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1241 <section id="fs_dirent" name="fs.Dirent"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1242 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1243 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1244 <literal>fs.Dirent</literal> является представлением записи каталога— |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1245 файлом или подкаталогом . |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1246 В случае, если |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1247 <link id="fs_readdirsync"><literal>readdirSync()</literal></link> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1248 вызывается с опцией |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1249 <link id="fs_readdirsync_withfiletypes"><literal>withFileTypes</literal></link> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1250 получившийся массив содержит объекты <literal>fs.Dirent</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1251 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1252 <list type= "bullet" compact="no"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1253 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1254 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1255 <literal>dirent.isBlockDevice()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1256 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1257 блочное устройство |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1258 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1259 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1260 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1261 <literal>dirent.isCharacterDevice()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1262 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1263 символьное устройство. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1264 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1265 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1266 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1267 <literal>dirent.isDirectory()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1268 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1269 каталог файловой системы. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1270 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1271 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1272 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1273 <literal>dirent.isFIFO()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1274 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1275 FIFO-канал. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1276 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1277 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1278 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1279 <literal>dirent.isFile()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1280 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1281 обычный файл. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1282 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1283 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1284 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1285 <literal>dirent.isSocket()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1286 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1287 сокет. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1288 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1289 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1290 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1291 <literal>dirent.isSymbolicLink()</literal>—возвращает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1292 <literal>true</literal>, если объект <literal>fs.Dirent</literal> описывает |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1293 символическую ссылку. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1294 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1295 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1296 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1297 <literal>dirent.name</literal>— |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1298 имя файла, на которое ссылается объект <literal>fs.Dirent</literal>. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1299 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1300 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1301 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1302 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1303 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1304 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1305 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1306 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1307 <section id="access_const" name="Константы доступа к файлу"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1308 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1309 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1310 Метод <link id="fs_accesssync"><literal>access()</literal></link> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1311 может принимать следующие флаги. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1312 Флаги экспортируются при помощи <literal>fs.constants</literal>: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1313 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1314 <list type= "bullet" compact="no"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1315 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1316 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1317 <literal>F_OK</literal>—указывает, что файл может |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1318 быть видимым для для вызывающего процесса, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1319 используется по умолчанию, если режим не указан |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1320 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1321 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1322 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1323 <literal>R_OK</literal>—указывает, что файл может |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1324 читаться вызывающим процессом |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1325 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1326 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1327 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1328 <literal>W_OK</literal>—указывает, что файл может |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1329 записываться вызывающим процессом |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1330 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1331 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1332 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1333 <literal>X_OK</literal>—указывает, что файл может |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1334 выполняться вызывающим процессом |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1335 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1336 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1337 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1338 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1339 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1340 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1341 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1342 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1343 <section id="njs_api_fs_flags" name="Флаги файловой системы"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1344 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1345 <para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1346 Опция <literal>флаг</literal> может принимать следующие значения: |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1347 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1348 <list type= "bullet" compact="no"> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1349 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1350 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1351 <literal>a</literal>—открытие файла для добавления данных. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1352 Если файл не существует, то он будет создан |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1353 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1354 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1355 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1356 <literal>ax</literal>—то же, что и <literal>a</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1357 но завершится неудачей, если файл существует |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1358 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1359 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1360 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1361 <literal>a+</literal>—открытие файла для чтения и добавления данных. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1362 Если файл не существует, то он будет создан |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1363 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1364 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1365 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1366 <literal>ax+</literal>—то же, что и <literal>a+</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1367 но завершится неудачей, если файл существует |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1368 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1369 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1370 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1371 <literal>as</literal>—открытие файла для добавления данных |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1372 в синхронном режиме. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1373 Если файл не существует, то он будет создан |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1374 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1375 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1376 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1377 <literal>as+</literal>—открытие файла для чтения и добавления данных |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1378 в синхронном режиме. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1379 Если файл не существует, то он будет создан |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1380 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1381 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1382 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1383 <literal>r</literal>— открытие файла для чтения. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1384 Если файл не существует, то возникнет исключение |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1385 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1386 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1387 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1388 <literal>r+</literal>—открытие файла для чтения и записи. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1389 Если файл не существует, то возникнет исключение |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1390 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1391 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1392 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1393 <literal>rs+</literal>—открытие файла для чтения и записи |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1394 в синхронном режиме. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1395 Указывает операционной системе не использовать кэш локальной файловой системы |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1396 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1397 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1398 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1399 <literal>w</literal>—открытие файла для записи. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1400 Если файл не существует, то он будет создан. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1401 Если файл существует, то он будет заменён. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1402 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1403 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1404 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1405 <literal>wx</literal>—то же, что и <literal>w</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1406 но завершится неудачей, если файл существует |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1407 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1408 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1409 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1410 <literal>w+</literal>—открытие файла для чтения и записи. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1411 Если файл не существует, то он будет создан. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1412 Если файл существует, то он будет заменён. |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1413 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1414 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1415 <listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1416 <literal>wx+</literal>—то же, что и <literal>w+</literal>, |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1417 но завершится неудачей, если файл существует |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1418 </listitem> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1419 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1420 </list> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1421 </para> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1422 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1423 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1424 |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1425 </section> |
28f98f596974
Translated the rest of njs Reference into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2570
diff
changeset
|
1426 |
2583
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1427 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1428 <section id="querystring" name="Query String"> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1429 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1430 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1431 Модуль Query String предоставляет поддержку |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1432 синтаксического разбора и форматирования строки запроса URL. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1433 (<link doc="changes.xml" id="njs0.4.3">0.4.3</link>). |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1434 Объект модуля Query String доступен через |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1435 <literal>require('querystring')</literal>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1436 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1437 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1438 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1439 <list type="tag"> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1440 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1441 <tag-name id="querystring_decode"><literal>querystring.decode()</literal></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1442 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1443 является псевдонимом для |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1444 <link id="querystring_parse"><literal>querystring.parse()</literal></link>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1445 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1446 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1447 <tag-name id="querystring_encode"><literal>querystring.encode()</literal></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1448 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1449 является псевдонимом для |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1450 <link id="querystring_stringify"><literal>querystring.stringify()</literal></link>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1451 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1452 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1453 <tag-name id="querystring_escape"><literal>querystring.escape(<value>строка</value>)</literal></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1454 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1455 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1456 Кодирует заданную <literal>строку</literal>, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1457 возвращает экранированную строку. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1458 Метод используется методом |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1459 <link id="querystring_stringify"><literal>querystring.stringify()</literal></link> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1460 и не должен использоваться напрямую. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1461 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1462 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1463 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1464 <tag-name id="querystring_parse"><literal>querystring.parse(<value>строка</value>[, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1465 <value>separator</value>[, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1466 <value>equal</value>[, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1467 <value>options</value>]]])</literal></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1468 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1469 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1470 Осуществляет синтаксический разбор строки запроса и возвращает объект. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1471 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1472 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1473 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1474 Параметр <literal>separator</literal> является подстрокой, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1475 разделяющей в строке запроса пары ключей и значений, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1476 по умолчанию “<literal>&</literal>”. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1477 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1478 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1479 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1480 Параметр <literal>equal</literal> является подстрокой, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1481 разделяющей в строке запроса ключи и значения, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1482 по умолчанию “<literal>=</literal>”. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1483 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1484 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1485 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1486 Параметр <literal>options</literal> должен быть |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1487 объектом со следующими ключами: |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1488 <list type="tag"> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1489 <tag-name><literal>decodeURIComponent</literal> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1490 <value>функция</value></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1491 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1492 Функция, используемая |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1493 при декодировании процентно-кодированных символов в строке запроса, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1494 по умолчанию |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1495 <link id="querystring_unescape"><literal>querystring.unescape()</literal></link> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1496 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1497 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1498 <tag-name><literal>maxKeys</literal> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1499 <value>число</value></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1500 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1501 максимальное число ключей для синтаксического разбора, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1502 по умолчанию <literal>1000</literal>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1503 Значение <literal>0</literal> удаляет ограничение на подсчёт ключей. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1504 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1505 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1506 </list> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1507 По умолчанию предполагается, что процентно-кодированные символы в строке запроса |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1508 используют кодировку UTF-8, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1509 неверная последовательность байтов UTF-8 будет заменена на |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1510 <literal>U+FFFD</literal>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1511 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1512 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1513 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1514 Пример для строки запроса: |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1515 <example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1516 'foo=bar&abc=xyz&abc=123' |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1517 </example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1518 результат: |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1519 <example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1520 { |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1521 foo: 'bar', |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1522 abc: ['xyz', '123'] |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1523 } |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1524 </example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1525 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1526 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1527 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1528 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1529 <tag-name id="querystring_stringify"><literal>querystring.stringify(<value>object</value>[, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1530 <value>separator</value>[, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1531 <value>equal</value>[, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1532 <value>options</value>]]])</literal></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1533 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1534 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1535 Осуществляет синтаксический разбор объекта и возвращает строку запроса. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1536 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1537 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1538 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1539 Параметр <literal>separator</literal> является подстрокой, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1540 разделяющей в строке запроса пары ключей и значений, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1541 по умолчанию “<literal>&</literal>”. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1542 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1543 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1544 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1545 Параметр <literal>equal</literal> является подстрокой, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1546 разделяющей в строке запроса ключи и значения, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1547 по умолчанию “<literal>=</literal>”. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1548 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1549 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1550 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1551 Параметр <literal>options</literal> должен быть |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1552 объектом со следующими ключами: |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1553 <list type="tag"> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1554 <tag-name><literal>encodeURIComponent</literal> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1555 <value>функция</value></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1556 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1557 Функция, используемая при декодировании |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1558 URL-небезопасных символов в в процентно-кодированные символы в строке запроса, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1559 по умолчанию |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1560 <link id="querystring_escape"><literal>querystring.escape()</literal></link>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1561 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1562 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1563 </list> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1564 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1565 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1566 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1567 По умолчанию символы, требующие процентной кодировки внутри строки запроса, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1568 кодируются в UTF-8. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1569 Если требуется другая кодировка, то |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1570 необходимо указать опцию <literal>encodeURIComponent</literal>. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1571 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1572 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1573 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1574 Пример: |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1575 <example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1576 querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], 123: '' }); |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1577 </example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1578 результат: |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1579 <example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1580 'foo=bar&baz=qux&baz=quux&123=' |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1581 </example> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1582 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1583 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1584 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1585 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1586 <tag-name id="querystring_unescape"><literal>querystring.unescape(<value>строка</value>)</literal></tag-name> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1587 <tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1588 <para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1589 Осуществляет декодирование процентно-кодированных символов URL |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1590 в <literal>строке</literal>, |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1591 возвращает неэкранированную строку запроса. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1592 Метод используется методом |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1593 <link id="querystring_parse"><literal>querystring.parse()</literal></link> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1594 и не должен использоваться напрямую. |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1595 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1596 </tag-desc> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1597 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1598 </list> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1599 </para> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1600 |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1601 </section> |
cd97adddd757
Documented Query String in njs Reference.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2582
diff
changeset
|
1602 |
2316
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
1603 </section> |
3a8d96efece6
Translated String object into Russian in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2295
diff
changeset
|
1604 |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1605 </article> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1606 |