开发者

OAuth "nested" params

The problem with the Ruby library OAuth (0.4.5) when I use a "nested" params in the query.

Example:

That does开发者_StackOverflow社区 not work that request

current_user.myapp.client.post('/api/weights', {"weight[value]"=> 65})

I got

---! Ruby / object: Net:: HTTPUnauthorized
body:! str
   str: Invalid OAuth Request
   "@ _rails_html_safe": false
body_exist: true
code: "401"

And this is working

current_user.myapp.client.post('/api/weights', {:weight => {:value => 65})

But the params do not come correct:

Parameters: {"weight" => "value65"}


Fixed this bug https://github.com/oauth/oauth-ruby/pull/35

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜