# HG changeset patch # User Yaroslav Zhuravlev # Date 1694705880 -3600 # Node ID 55d49eb065acb935cff39e8b3e2468c8a16b9997 # Parent 758e2e1dfd22132a8ae6ee9aac389aab19183b90 Fixed example in the js_periodic directive. diff --git a/xml/en/docs/http/ngx_http_js_module.xml b/xml/en/docs/http/ngx_http_js_module.xml --- a/xml/en/docs/http/ngx_http_js_module.xml +++ b/xml/en/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ + rev="43">
@@ -602,8 +602,8 @@ location @periodics { example.js: async function handler(s) { - let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); - let body = async reply.text(); + let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); + let body = await reply.text(); ngx.log(ngx.INFO, body); } diff --git a/xml/en/docs/stream/ngx_stream_js_module.xml b/xml/en/docs/stream/ngx_stream_js_module.xml --- a/xml/en/docs/stream/ngx_stream_js_module.xml +++ b/xml/en/docs/stream/ngx_stream_js_module.xml @@ -9,7 +9,7 @@ + rev="42">
@@ -519,8 +519,8 @@ location @periodics { example.js: async function handler(s) { - let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); - let body = async reply.text(); + let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); + let body = await reply.text(); ngx.log(ngx.INFO, body); } diff --git a/xml/ru/docs/http/ngx_http_js_module.xml b/xml/ru/docs/http/ngx_http_js_module.xml --- a/xml/ru/docs/http/ngx_http_js_module.xml +++ b/xml/ru/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ + rev="43">
@@ -605,8 +605,8 @@ location @periodics { example.js: async function handler(s) { - let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); - let body = async reply.text(); + let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); + let body = await reply.text(); ngx.log(ngx.INFO, body); } diff --git a/xml/ru/docs/stream/ngx_stream_js_module.xml b/xml/ru/docs/stream/ngx_stream_js_module.xml --- a/xml/ru/docs/stream/ngx_stream_js_module.xml +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml @@ -9,7 +9,7 @@ + rev="42">
@@ -618,8 +618,8 @@ location @periodics { example.js: async function handler(s) { - let reply = async ngx.fetch('https://nginx.org/en/docs/njs/'); - let body = async reply.text(); + let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); + let body = await reply.text(); ngx.log(ngx.INFO, body); }