gpt4 book ai didi

grails - 如何通过像 Fiddler 这样的代理使用 intellij/grails 和 wslite soap 客户端来查看消息?

转载 作者:行者123 更新时间:2023-12-02 14:42:18 26 4
gpt4 key购买 nike

我想设置一个代理检查工具,例如 fiddler 或 Charles 代理(我都有),所以我可以看到正在发送和接收的内容 - 没有这个你是盲目的。

问题是,我如何告诉 grails 2.4.4 或 wslite-0.7.2.0 插件使用我的本地代理服务器?

遗憾的是,该插件只有 1 页的文档,其中的示例与它应该引入的 groovy-wslite 库完全不同。

例如https://github.com/jwagenleitner/groovy-wslite

说我应该能够做到这一点:

 def proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress('proxy.example.com', 8080))
def client = new SOAPClient("https://www.example.com/ExampleService")
def response = client.send(proxy:proxy) {

但是当我尝试这种格式时,我得到:
 No signature of method: wslite.soap.SOAPClient.send() is applicable for argument types: (java.net.Proxy, 

最佳答案

找到了答案。

        def client = new SOAPClient('https://bla')
def proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress('localhost', 8888))
client.httpClient.proxy = proxy

def response = client.send(SOAPAction: 'blabla') {

关于grails - 如何通过像 Fiddler 这样的代理使用 intellij/grails 和 wslite soap 客户端来查看消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28497377/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com