can't create a cookie in a wrapped request (defaults) #170

Merged
merged 1 commit into from Feb 12, 2012

Projects

None yet

2 participants

@fabianonunes
Contributor

when the request object is a wrapped defaults, creating a cookie throws a expection

var cookie = request.cookie( 'your_cookie_here' )
Error: The cookie function only accepts STRING as param

the 'cookie' method only accepts a string, but the wrapped request transforms any params in { uri:opts }

if (typeof opts === 'string') opts = {uri:opts}
@mikeal mikeal merged commit 05e1c78 into request:master Feb 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment