Members
acceptEncodings :Array.<String>
A list of encodings that the client accepts, most preffered first.
Type:
- Array.<String>
- Source:
acceptLanguages :Array.<String>
A list of languages that the client accepts, most preffered first.
Type:
- Array.<String>
- Source:
acceptTypes :Array.<String>
A list of content types that the client accepts, most preffered first.
Type:
- Array.<String>
- Source:
body :Buffer
The request body. Only guarenteed to be filled when the
'end'
event is emitted.
Type:
- Buffer
- Source:
connectionIp :String
The connection IP address. Shorthand of req.connection.remoteAddress.
Type:
- String
- Source:
ip :String
The connection IP address, giving the X-Forwared-For header priority.
Type:
- String
- Source:
query :Object
A parsed version of
req.url.query
.
Type:
- Object
- Source:
secure :Boolean
true
if the protocol is HTTPS, false
otherwise.
Type:
- Boolean
- Source:
url :Object
A parsed version of
req.url
.
Type:
- Object
- Source:
Methods
accepts(contentType) → {Boolean}
Checks if a client accepts a specific content type.
Parameters:
Name | Type | Description |
---|---|---|
contentType |
String | The type to check. |
- Source:
Returns:
true if the client does accept it, false
otherwise.
- Type
- Boolean
acceptsEncoding(encoding) → {Boolean}
Checks if a client accepts a specific encoding.
Parameters:
Name | Type | Description |
---|---|---|
encoding |
String | The encoding to check. |
- Source:
Returns:
true if the client does accept it, false
otherwise.
- Type
- Boolean
acceptsLanguage(language) → {Boolean}
Checks if a client accepts a specific language.
Parameters:
Name | Type | Description |
---|---|---|
language |
String | The language to check. |
- Source:
Returns:
true if the client does accept it, false
otherwise.
- Type
- Boolean