Ruby Savon SOAP 检查请求对象
有没有办法在请求调用之前或之后检查请求对象?
client = Savon::Client.new do
wsdl.endpoint = "https://testsoap.com/wsdlserver"
end
response = client.request do
soap.body = {:a => 1, :b => 2, :c => { :xx => 3, :yy => 4} }
end
基本上,我怎样才能看到我发送出去的 xml post 数据。谢谢。
Is there a way to inspect the request object before or after the request call?
client = Savon::Client.new do
wsdl.endpoint = "https://testsoap.com/wsdlserver"
end
response = client.request do
soap.body = {:a => 1, :b => 2, :c => { :xx => 3, :yy => 4} }
end
Basically, how can I see the xml post data that I am sending out. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我总是使用 pp
显然这对于检查之前不起作用。对于这种情况,我依赖 Savon 的日志记录功能。
I always use pp
Obviously that doesn't work for before inspections. For that case I rely on the logging function of Savon.