From: Brian Candler Date: 2010-03-30T19:52:13+09:00 Subject: Re: Ruby web service. bradphelan wrote: > However I see two ways of doing constructing the POST/PUT body. > > (a) Posting the XML parameter as the body of the post using an XML > content type > (b) Using URL encoding and setting a parameter > > xml=... > > Can I choose either approach or do I need to support both? It's your app and your users, so you get to choose :-) But (a) is the standard way to handle XML uploads. If you want to handle form data, note that Rack/Sinatra/Rails support nested form elements, so for example a[b][c]=1&a[b][d]=2 will give you params = {"a"=>{"b"=>{"c"=>"1","d"=>"2"}}} -- Posted via http://www.ruby-forum.com/.