检查 Mule HTTP 连接器中用于请求的实际 URL [英] Check actual URL used for request in Mule HTTP Connector

查看:48
本文介绍了检查 Mule HTTP 连接器中用于请求的实际 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个包含 <http:request> 元素的流程,但我不断收到意外的 404 响应.有没有办法让我检查请求的实际 URL?

I'm working on a flow that includes an <http:request> element, but I keep getting unexpected 404 responses. Is there a way for me to check the actual URL that is being requested?

我在 Mule 中看不到任何方法可以做到这一点.我也尝试使用 Fiddler 作为代理,但无法让任何会话显示在 Fiddler 中以处理从 Mule 开始的请求.

I can't see any way to do this within Mule. I also tried using Fiddler as a proxy but can't get any sessions to show up in Fiddler for the requests starting from Mule.

推荐答案

您可以使用 CharlesProxy 之类的代理:http://www.charlesproxy.com/ 或其他东西,但你也可以只使用 log4j.如果您尝试将其添加到 log4j2 配置中:

You can use a proxy like CharlesProxy: http://www.charlesproxy.com/ or something but you can also just use log4j. If you try adding this to your log4j2 configuration:

    <AsyncLogger name="org.glassfish.grizzly" level="DEBUG" />
    <AsyncLogger name="org.asynchttpclient" level="DEBUG" />
    <AsyncLogger name="com.ning.http" level="DEBUG" />

对于使用 http:request 到 http://google.com 的 HTTP 请求,它会记录以下内容:

For a HTTP request using the http:request to http://google.com, it logs the following:

DEBUG 2015-07-14 13:18:17,416 [[test].test.worker.01] com.ning.http.client.providers.grizzly.GrizzlyConnectionsPool: [poll] 没有现有的 uri 队列 [http://google.com:80].DEBUG 2015-07-14 13:18:17,449 [[test].http.requester.httprequest(1) SelectorRunner] com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider: REQUEST: HttpRequestPacket (方法=GET网址=/查询=空协议=HTTP/1.1内容长度=-1标题=[主机=google.com:80连接=保持活动状态接受=/用户代理=NING/1.0])

DEBUG 2015-07-14 13:18:17,416 [[test].test.worker.01] com.ning.http.client.providers.grizzly.GrizzlyConnectionsPool: [poll] No existing queue for uri [http://google.com:80]. DEBUG 2015-07-14 13:18:17,449 [[test].http.requester.httprequest(1) SelectorRunner] com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider: REQUEST: HttpRequestPacket ( method=GET url=/ query=null protocol=HTTP/1.1 content-length=-1 headers=[ Host=google.com:80 Connection=keep-alive Accept=/ User-Agent=NING/1.0] )

这篇关于检查 Mule HTTP 连接器中用于请求的实际 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆