]> git.kaiwu.me - njs.git/commit
Modules: added ngx.fetch().
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 21 Jan 2021 18:44:58 +0000 (18:44 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Thu, 21 Jan 2021 18:44:58 +0000 (18:44 +0000)
commit73c75e41cf56c3b5ac6c0fd09293f20b838c2d5f
treebfe5b60d9f6dc0c40b63f1ecf12af8c5c2bd59da
parent300c8514379c4c2f062e5f3a09fe1ae553329165
Modules: added ngx.fetch().

This is an initial implementation of Fetch API.

The following init options are supported:
body, headers, buffer_size (nginx specific), max_response_body_size
(nginx specific), method.

The following properties and methods of Response object are implemented:
arrayBuffer(), bodyUsed, json(), headers, ok, redirect, status, statusText,
text(), type, url.

The following properties and methods of Header object are implemented:
get(), getAll(), has().

Notable limitations: only http:// scheme is supported, redirects
are not handled.

In collaboration with 洪志道 (Hong Zhi Dao).
nginx/config
nginx/ngx_http_js_module.c
nginx/ngx_js.c
nginx/ngx_js.h
nginx/ngx_js_fetch.c [new file with mode: 0644]
nginx/ngx_js_fetch.h [new file with mode: 0644]
nginx/ngx_stream_js_module.c