【问题标题】:OAuth "nested" paramsOAuth“嵌套”参数
【发布时间】: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


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2012-07-30
      • 2015-05-05
      • 2015-09-20
      • 2012-08-01
      • 2018-05-23
      • 1970-01-01
      • 2023-03-18
      • 2018-07-12
      • 1970-01-01
      相关资源
      最近更新 更多