dscape/nano — pull request #71 by beardtwizzle (2012-05-15 22:34:40+00:00)
Title: Cookie authentication

Further to issue #65 it is unfortunately not possible to use request defaults for this.

Request will only use values held in its defaults that [do not already exist in the current request](https://github.com/mikeal/request/blob/master/main.js#L848). Because nano has to always pass over `headers` (for content-type for example), any 'default' headers will never be used by request.

This pull differs slightly from my original proposal in #65 - I think its cleaner, because you only pass in the cookie in nano's configuration object literal (not via `params`).

I'm unsure if the test I've added is sufficient, hope so! :)

Many thanks