This commit is contained in:
TJ Holowaychuk 2013-12-17 23:53:58 -08:00
parent dc20952996
commit 97a3d84ec9

View file

@ -24,15 +24,6 @@
Return request Content-Length as a number when present, or `undefined`.
### req.type
Get request `Content-Type` void of parameters such as "charset".
```js
var ct = this.type;
// => "image/png"
```
### req.url
Get request URL.
@ -49,6 +40,36 @@ var ct = this.type;
Set request pathname and retain query-string when present.
### req.querystring
Get raw query string void of `?`.
### req.querystring=
Set raw query string.
### req.search
Get raw query string with the `?`.
### req.search=
Set raw query string.
### req.host
Get host void of port number when present. Supports `X-Forwarded-Host`
when `app.proxy` is __true__, otherwise `Host` is used.
### req.type
Get request `Content-Type` void of parameters such as "charset".
```js
var ct = this.type;
// => "image/png"
```
### req.query
Get parsed query-string, returning an empty object when no
@ -73,27 +94,6 @@ var ct = this.type;
this.query = { next: '/login' };
```
### req.querystring
Get raw query string void of `?`.
### req.querystring=
Set raw query string.
### req.search
Get raw query string with the `?`.
### req.search=
Set raw query string.
### req.host
Get host void of port number when present. Supports `X-Forwarded-Host`
when `app.proxy` is __true__, otherwise `Host` is used.
### req.fresh
Check if a request cache is "fresh", aka the contents have not changed. This