veloze
Version:
A modern and fast express-like webserver for the web
26 lines (17 loc) • 593 B
Markdown
[◀︎ request/accept](../request/accept.md)
[🛖](../index.md)
[request/isHttpsProto ▶](../request/isHttpsProto.md)
# request/getHeader
## getHeader (req, header)
Returns the HTTP header from the request.
| type | property | description |
| -------------------- | --------- | -------------------- |
| http.IncomingMessage | req | request object |
| string | \[header] | the header to obtain |
```js
req.headers["content-type"] = "application/json";
getHeader(req, "Content-Type");
// 'application/json'
```
---
[🔝 TOP](#top)