]> git.kaiwu.me - njs.git/commit
HTTP: added r.readRequestForm(). master
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 10 Apr 2026 05:56:01 +0000 (22:56 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 6 May 2026 00:50:59 +0000 (17:50 -0700)
commit0ffc96df7f341f6c5f6f70cb6207030b6afe0de3
tree042e0dc8de1463bfde6692c3e7f7084c8eae5565
parent7684d70257708a4dad6aca024e906d9e1ed705dc
HTTP: added r.readRequestForm().

The async method parses the client request body as an HTML form
and returns a Promise resolving to a form object with get(),
getAll(), has(), forEach(), hasFiles() accessors.

Supports "application/x-www-form-urlencoded" and "multipart/form-data"
content types.  File parts are detected but their contents are not
exposed.  An optional maxKeys option caps the number of fields.

File parts are detected but their contents are not exposed.  A
proper File API with streaming Blob semantics is a significant amount
of work and is out of scope.
nginx/config
nginx/ngx_http_js_module.c
nginx/ngx_js.h
nginx/ngx_js_form.c [new file with mode: 0644]
nginx/ngx_js_form.h [new file with mode: 0644]
nginx/t/js_request_form.t [new file with mode: 0644]
ts/ngx_http_js_module.d.ts