add additional node.js aliases
This commit is contained in:
parent
fbfeffa090
commit
f961647377
1 changed files with 54 additions and 3 deletions
|
@ -896,6 +896,57 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
|
||||
setHeader: function(field, val){
|
||||
this.set(field, val);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the current response header `name`.
|
||||
*
|
||||
* @param {String} name
|
||||
* @api public
|
||||
*/
|
||||
|
||||
getHeader: function(name){
|
||||
return this.res.getHeader(name);
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove the current response header `name`.
|
||||
*
|
||||
* @param {String} name
|
||||
* @api public
|
||||
*/
|
||||
|
||||
removeHeader: function(name){
|
||||
return this.res.removeHeader(name);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the trailing headers to a request.
|
||||
*
|
||||
* @param {Object}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
get trailers() {
|
||||
return this.req.trailers;
|
||||
},
|
||||
|
||||
/**
|
||||
* Add trailing headers to the response.
|
||||
*
|
||||
* Maybe:
|
||||
* - throw if not chunked encoding
|
||||
*
|
||||
* @param {object} headers
|
||||
* @api public
|
||||
*/
|
||||
|
||||
addTrailers: function(headers){
|
||||
return this.res.addTrailers(headers);
|
||||
},
|
||||
|
||||
/**
|
||||
* Append `val` to header `field`.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue