首页 文章

如何让冷体融合返回请求体?

提问于
浏览
0

这是响应的链接 .

http://requestb.in/116o44e1?inspect

从这个回应中,我必须得到'RAW BODY' . 因为我在Cold Fusion中尝试过这样的 .

<cfhttp url="http://requestb.in/116o44e1?inspect" method="get">
<cfset getResult =(cfhttp.filecontent.RAW BODY)>
<cfoutput>#getResult#</cfoutput>

但它不起作用 . 如何以正确的方式做到这一点 . 请帮我解决这个问题 .

当我试图获取值时,这是错误:

Error

1 回答

  • 1

    在第696行的图像中,您将其设置如下:

    <cfset getresult = (cfhttp.filecontent.raw body)>
    

    这是不正确的语法 .

    试试这个:

    <cfhttp url="http://127.0.0.1" method="get" >
    
     <!--- this will return the content of your url --->
    <cfset getresult=cfhttp.fileContent>
    

    如果有帮助,请告诉我 .

相关问题