From 4870a4e3da44d61f1fec67449d311fba5fc71af6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 12 Sep 2012 02:46:45 +0200 Subject: [PATCH] doc: http: expand request.headers documentation --- doc/api/http.markdown | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 48c9abaa09..7b3b9d93ab 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -265,7 +265,16 @@ you can use the `require('querystring').parse` function, or pass ### request.headers -Read only. +Read only map of header names and values. Header names are lower-cased. +Example: + + // Prints something like: + // + // { 'user-agent': 'curl/7.22.0', + // host: '127.0.0.1:8000', + // accept: '*/*' } + console.log(request.headers); + ### request.trailers