OAuth“嵌套”参数

时间:2011-10-03 11:14:40

标签: ruby-on-rails ruby oauth

当我使用"嵌套"时,Ruby库OAuth(0.4.5)的问题查询中的参数。

示例:

这不符合要求

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

我得到了

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

这是有效的

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

但是这些参数不正确:

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

1 个答案:

答案 0 :(得分:0)