Faraday: 不支持 TRACE 和 CONNECT 动词

创建于 2015-01-27  ·  4评论  ·  资料来源: lostisland/faraday

> Faraday.run_request(:trace, 'http://example.com', "", {})
ArgumentError: unknown http method: trace
> Faraday.run_request(:connect, 'http://example.com', "", {})
ArgumentError: unknown http method: connect

这两种方法在 Ruby HTTP 客户端中都得到了相当广泛的支持,而 Net::HTTP 支持 TRACE。

feature help wanted

所有4条评论

我们接受 PR 将其添加到支持的方法列表中,包括验证调用是否跨适配器工作的测试https://github.com/lostisland/faraday/blob/458f319c0d6f3fc64f766d2383fa07b9f4ab991a/lib/faraday/connection.rb#L15

添加 #861

861 现在已合并,因此可以关闭

@technoweenie @iMacTia当 PR #861 将在新版本中可用时,是否有预计到达时间? 我正在使用 InSpec,它使用法拉第作为 HTTP 库,并且 0.15.4 于 2018 年 11 月 27 日发布,恐怕他们会等到新版本的法拉第可用,其中包括缺少的 HTTP 方法。

inspec> http('https://www.example.org', method: 'TRACE').headers
ArgumentError: unknown http method: trace
from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/faraday-0.15.4/lib/faraday/connection.rb:373:in `run_request'

提前致谢并致以亲切的问候,
塞伯

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

t3hk0d3 picture t3hk0d3  ·  3评论

mokolabs picture mokolabs  ·  3评论

iMacTia picture iMacTia  ·  3评论

luizkowalski picture luizkowalski  ·  3评论

aleksb86 picture aleksb86  ·  3评论