Link to home
Start Free TrialLog in
Avatar of gaby22
gaby22

asked on

How to get the URL from a CFHTTP post

I'm posting formfields to an application using CFHTTP.  The application returns the variable named "status" indicating if the data is correct or not. When I output the cfhhtp.filecontent I only see the action page but the return variable is displayed only in the URL of the action page.. How do I get the URL from the action page to be displayed?

<cfhttp method="POST"   URL="http://actionpage.asp" resolveurl="yes">
<cfhttpparam type="Formfield" Name="First_Name" value=#fname#>
<cfhttpparam type="Formfield" Name="Last_Name" value=#lname#>
<cfhttpparam type="Formfield" Name="Email" value=#email#>
</cfhttp>
  <cfoutput>#cfhttp.FileContent#</cfoutput>

The action page displays “Thank You for Submiting your Info”

The url of the action page looks like http://actionpage.asp?response=accepted  or  http://actionpage.asp?response=rejected

I’m not able to capture the variable “response”
Avatar of dlewis9
dlewis9

Can you modify the ASP page?  I'm not sure it can be done otherwise..I tried a few things with the response header, but no luck.

If you can modify the ASP page, the easiest thing to do is just have it return the value you want and then have CF display the "Thank You" message.
Try <cfdump var="#cfhttp#"> and see if there is anything in there that you can use.
ASKER CERTIFIED SOLUTION
Avatar of INSDivision6
INSDivision6

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial