ColdFusion - How to get HTTP request data

GetHTTPRequestData() - get HTTP request data (content, headers, method, protocol)

GetHTTPRequestData.cfm


<!DOCTYPE html">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GetHTTPRequestData function example: how to get HTTP request data (content, headers, method, protocol)</title>
</head>
<h2 style="color:Crimson">GetHTTPRequestData Function Example</h2>
<cfset HTTPRequestData = GetHttpRequestData()>
<cfdump var="#HTTPRequestData#" label="HTTP Request Data">

<cfoutput>
<b>Content:</b> #HTTPRequestData.content#
<br />
<b>Method:</b> #HTTPRequestData.method#
<br />
<b>Protocol:</b> #HTTPRequestData.protocol#
<br />
</cfoutput>
<cfdump var="#HTTPRequestData.headers#" label="HTTP Request Data-headers">

<body>
</body>
</html>





More coldfusion examples