查看CFHTTP调用的原始HTML [英] View Raw HTML of CFHTTP call

查看:209
本文介绍了查看CFHTTP调用的原始HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法输出 CFHTTP 电话的原始html?我正在尝试查看一些标头身份验证信息是如何发生的。

Is there a way to output the raw html of a CFHTTP call? I am trying to see how some of the header authentication information is coming across.

我对浏览器插件或代码更新持开放态度,无论哪个帮助我看看在此期间发生了什么 cfhttp 致电。

I am open to browser plugins or code updates whichever helps me see what is going on during the cfhttp call.

例如:

<cfhttp method="get" url="https://test-ows01.mywebsite.com/criminal_api//1.0/service/requests" result="orderList">
    <cfhttpparam type="HEADER" name="Authorization" value="Basic #ToBase64("bearer:4EC8B09D3F911764B1DCD3EFA38DFB31")#">
</cfhttp>

上述调用在发生时会是什么样子。

what does the above call look like when it happens.

推荐答案

如果我理解正确,听起来更像是想要查看发送的 到远程服务器,而不是收到的。 安装像Fiddler这样的工具将提供非常强大的调试功能,允许您在发生http请求时查看它们。 (另请参阅启用HTTPS流量解密的文档。)

If I am understanding correctly, it sounds more like you want to view the http request sent to the remote server, rather than what is received. Installing a tool like Fiddler will provide very robust debugging, allowing you to view http requests as they happen. (See also the documentation for Enable HTTPS traffic decryption).

提示快速调试,低技术黑客是将目标URL切换到服务器上的单独.cfm脚本。在脚本内部,转储 GetHTTPRequestData() ,显示发送到脚本的请求标题和正文。

Tip for quick debugging, a low-tech hack is to switch the target URL to a separate .cfm script on your server. Inside the script, dump GetHTTPRequestData(), to display the request headers and body sent to the script.

test.cfm

<cfhttp method="get" url="http://localhost/receivingPage.cfm" result="orderList">
    <cfhttpparam type="HEADER" name="Authorization" 
         value="Basic #ToBase64("bearer:4EC8B09D3F911764B1DCD3EFA38DFB31")#">
</cfhttp>

receivingPage.cfm

<cfdump var="#GetHTTPRequestData()#">

这篇关于查看CFHTTP调用的原始HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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