Mercurial > hg > nginx-site
comparison xml/ru/docs/http/ngx_http_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_http_js_module" | 9 <module name="Модуль ngx_http_js_module" |
10 link="/ru/docs/http/ngx_http_js_module.html" | 10 link="/ru/docs/http/ngx_http_js_module.html" |
11 lang="ru" | 11 lang="ru" |
12 rev="42"> | 12 rev="43"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 Модуль <literal>ngx_http_js_module</literal> позволяет задавать | 17 Модуль <literal>ngx_http_js_module</literal> позволяет задавать |
603 } | 603 } |
604 | 604 |
605 example.js: | 605 example.js: |
606 | 606 |
607 async function handler(s) { | 607 async function handler(s) { |
608 let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); | 608 let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); |
609 let body = async reply.text(); | 609 let body = await reply.text(); |
610 | 610 |
611 ngx.log(ngx.INFO, body); | 611 ngx.log(ngx.INFO, body); |
612 } | 612 } |
613 </example> | 613 </example> |
614 </para> | 614 </para> |