Rails messing up with HTTP POST Params

Posted by Julien Genestoux on Stack Overflow See other posts from Stack Overflow or by Julien Genestoux
Published on 2010-06-08T17:05:05Z Indexed on 2010/06/08 21:32 UTC
Read the original article Hit count: 280

Filed under:
|
|

Our app provides an API that people can use to submit URLs like this:

curl -X POST http://app.local/resource -d'url=http://news.google.com/newshl=en&q=obama&um=1&ie=UTF-8&output=rss' 

Unfortunately, it seems that Rails messes up with this param. Any idea on how to fix this? See the log below :

Processing ApplicationController#index (for 127.0.0.1 at 2010-06-08 19:03:09) [POST]
  Parameters: {"um"=>"1", "url"=>"http://news.google.com/newshl=en", "output"=>"rss", "q"=>"obama", "ie"=>"UTF-8"}

I would expect the following :

  Parameters: {"url"=>"hhttp://news.google.com/newshl=en&q=obama&um=1&ie=UTF-8&output=rss"}

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about post