| GETHTTPREQUESTDATA | |
| Description
Makes HTTP request headers and body available to CFML pages. Useful for capturing SOAP request data, which can be delivered in an HTTP header. |
|
| Returns
A ColdFusion structure. |
|
| Category
System functions |
|
Function syntaxGetHttpRequestData() |
|
| Returns
The function returns a structure containing the following entries:
|
|
| Usage
To determine whether data is binary, use IsBinary(x.content). To convert data to a string value, if it can be displayed as a string, use ToString(x.content). |
|
| Example
The following example shows how this function can return HTTP header information. <cfset x = GetHttpRequestData()>
<cfoutput>
<table cellpadding = "2" cellspacing = "2">
<tr>
<td><b>HTTP Request item</b></td>
<td><b>Value</b></td> </tr>
<cfloop collection = #x.headers# item = "http_item">
<tr>
<td>#http_item#</td>
<td>#StructFind(x.headers, http_item)#</td> </tr>
</cfloop>
<tr>
<td>request_method</td>
<td>#x.method#</td></tr>
<tr>
<td>server_protocol</td>
<td>#x.protocol#</td></tr>
</table>
<b>http_content --- #x.content#</b>
</cfoutput>
|
|
| CONTENT | |
| HEADERS | |
| METHOD | |
| PROTOCOL | |