Properly encoding a string as application/x-www-form-urlenco

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, “”