Mercurial > hg > nginx-site
comparison xml/en/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="Module ngx_http_js_module" | 9 <module name="Module ngx_http_js_module" |
10 link="/en/docs/http/ngx_http_js_module.html" | 10 link="/en/docs/http/ngx_http_js_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="42"> | 12 rev="43"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_http_js_module</literal> module is used to implement | 17 The <literal>ngx_http_js_module</literal> module is used to implement |
600 } | 600 } |
601 | 601 |
602 example.js: | 602 example.js: |
603 | 603 |
604 async function handler(s) { | 604 async function handler(s) { |
605 let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); | 605 let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); |
606 let body = async reply.text(); | 606 let body = await reply.text(); |
607 | 607 |
608 ngx.log(ngx.INFO, body); | 608 ngx.log(ngx.INFO, body); |
609 } | 609 } |
610 </example> | 610 </example> |
611 </para> | 611 </para> |