Allow passing a hash instead of a string in Browser#post's options.body. #42

wants to merge 1 commit into


None yet

2 participants

bantic commented Jun 28, 2011

One more...

This changes it so that the "body" option for can be a hash rather than a string. Makes tobi easier to use this way (before this I was having to properly escape the string by hand).

Allows one to do:'/login', { body: {foo:"b&r",bar:"foo"} }, function(res, $){


The test includes the text "b&r" to ensure that the escaping is being done properly.


tj commented Jun 28, 2011

we should extend visionmedia/node-querystring (qs in npm) to add a stringify() method, handling the different cases

bantic commented Jun 28, 2011

I'll take a look at doing that.

bantic commented Jun 28, 2011

I made some changes to node-querystring and issued a pull request there...I'll re-open this later.

@bantic bantic closed this Jun 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment