【发布时间】:2011-10-05 23:23:55
【问题描述】:
当我在查询中使用“嵌套”参数时,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"}
【问题讨论】:
标签: ruby-on-rails ruby oauth