Back to Expressjs

Req Get

_includes/api/en/4x/req-get.md

latest337 B
Original Source
<h3 id='req.get'>req.get(field)</h3>

Returns the specified HTTP request header field (case-insensitive match). The Referrer and Referer fields are interchangeable.

js
req.get('Content-Type')
// => "text/plain"

req.get('content-type')
// => "text/plain"

req.get('Something')
// => undefined

Aliased as req.header(field).