From f6f43653628bd7de6b3592f04ced5d9809ff5253 Mon Sep 17 00:00:00 2001 From: Parsha Pourkhomami Date: Fri, 31 Oct 2014 15:22:29 -0700 Subject: [PATCH] Update documentation to match node http module See #71. The Node http module's response object has `response.headers`, not `response.getHeader()`. The *http-browserify* module provides both, but previously only documented `response.getHeader()`. This changes the documentation to document `response.headers` instead. The `response.getHeader()` function is left undocumented as technically it does not match the node http module implementation. --- readme.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.markdown b/readme.markdown index bd5c14b..3793e82 100644 --- a/readme.markdown +++ b/readme.markdown @@ -81,9 +81,11 @@ Close and send the request body, optionally with additional `data` to append. # response methods -## res.getHeader(key) +## res.headers -Return an http header, if set. `key` is case-insensitive. +The response headers object. + +Read only map of header names and values. Header names are lower-cased. # response attributes