]> git.kaiwu.me - njs.git/commit
Merged HTTP Response and Reply into Request.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 13 Jun 2018 11:11:58 +0000 (14:11 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 13 Jun 2018 11:11:58 +0000 (14:11 +0300)
commit20b0891190c254778075b2067673d8c9ee1a36c1
tree12357b877d46579642cdf20321c18aa01dfc6079
parent8e8b0556dcff2b6f02efad25e015cb575352d4b0
Merged HTTP Response and Reply into Request.

Splitting HTTP functionality into 3 objects Request, Response and Reply
introduced a lot of confusion as to which method should belong to which object.

New members of Request:
- req.status (res.status)
- req.parent (reply.parent)
- req.requestBody (req.body)
- req.responseBody (reply.body)
- req.headersIn (req.headers)
- req.headersOut (res.headers)
- req.sendHeader() (res.sendHeader())
- req.send() (res.send())
- req.finish() (res.finish())
- req.return() (res.return())

Deprecated members of Request:
- req.body (use req.requestBody or req.responseBody)
- req.headers (use req.headersIn or req.headersOut)
- req.response

Response is remained in place for backward compatibility and will be removed in
the following releases.  Reply is replaced with Request in the req.subrequest()
callback.  The deprecated properties will be removed in the following releases.
nginx/ngx_http_js_module.c