Carl Woodward
2006-Aug-08 02:11 UTC
[Rails] Properly encoding a string as application/x-www-form-urlencoded for post
Hi, can anyone tell me how use the post method for testing to post an xml string as the body to the post. The documentation reads: Performs a POST request with the given parameters. The parameters may be nil, a Hash, or a string that is appropriately encoded (application/x-www-form-urlencoded or multipart/form-data). How do I appropriately encode the string for the post? I need something like: post :method, "<xml></xml>" Thanks, Carl.