나는 cfhttp.responseHeader
의 내용을 읽는 방법을 알아 내려고 노력하고 있습니다. 나는 응답의 쿠키 몇을 보내는 웹 사이트에 액세스하려고합니다. 나는 응답에서 그들을 추출해야합니다. 이후의 모든 요청과 함께 쿠키 값을 보냅니다. 나는 코드 아래에 사용하려 :Coldfusion CFHTTP.Responseheader
<cfloop collection = #cfhttp.responseHeader# item = "httpHeader">
<cfset value = cfhttp.responseHeader[httpHeader]>
<cfif IsSimpleValue(value)>
<cfoutput>
#httpHeader# : #value#<BR>
</cfoutput>
<cfelse>
<cfloop index = "counter" from = 1 to = #ArrayLen(value)#>
<cfoutput>
#httpHeader# : #value[counter]#<BR>
</cfoutput>
</cfloop>
</cfif>
하지만 당신은 다음과 같은 쿠키를 검색 할 수 있습니다
Object of type class coldfusion.util.FastHashtable cannot be used as an array
The error occurred in C:/inetpub/wwwroot/cfdocs/Response.cfm: line 22
20 : </cfoutput>
21 : <cfelse>
22 : <cfloop index = "counter" from = 1 to = #ArrayLen(value)#>
23 : <cfoutput>
24 : #httpHeader# : #value[counter]#<BR>