Mercurial > hg > nginx-site
comparison xml/ru/docs/stream/ngx_stream_js_module.xml @ 3011:55d49eb065ac
Fixed example in the js_periodic directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 14 Sep 2023 16:38:00 +0100 |
parents | 4470b2bff7b7 |
children | c0a4a4a55e45 |
comparison
equal
deleted
inserted
replaced
3010:758e2e1dfd22 | 3011:55d49eb065ac |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Модуль ngx_stream_js_module" | 9 <module name="Модуль ngx_stream_js_module" |
10 link="/ru/docs/stream/ngx_stream_js_module.html" | 10 link="/ru/docs/stream/ngx_stream_js_module.html" |
11 lang="ru" | 11 lang="ru" |
12 rev="40"> | 12 rev="42"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 Модуль <literal>ngx_stream_js_module</literal> позволяет задавать | 17 Модуль <literal>ngx_stream_js_module</literal> позволяет задавать |
616 } | 616 } |
617 | 617 |
618 example.js: | 618 example.js: |
619 | 619 |
620 async function handler(s) { | 620 async function handler(s) { |
621 let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); | 621 let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); |
622 let body = async reply.text(); | 622 let body = await reply.text(); |
623 | 623 |
624 ngx.log(ngx.INFO, body); | 624 ngx.log(ngx.INFO, body); |
625 } | 625 } |
626 </example> | 626 </example> |
627 </para> | 627 </para> |