Skip to main content
Inspiring
April 27, 2010
Question

CFHTTP Help

  • April 27, 2010
  • 1 reply
  • 498 views

I'm trying to figure out why a form post will work but using the same techique with a cfhttp tag won't.  Maybe some SSL issue?  Any ideas on what I can do to find out why it won't work?

This works:

test.cfm

<html>

.

.

<form name="myform" action="https://some-url-that-takes-a-username-and-password" method="post" target="_top">

<input id="user_id" name="sso_id" style="width: 170px" maxlength="50" />

<input type="password" name="password"  style="width: 170px" maxlength="50" />

</form>

.

.

</html>

Won't work:

test.cfm

<html>

.

.

<form name="myform"  action="perform-cfhttp.cfm"  method="post" target="_top">

<input id="user_id"  name="sso_id" style="width: 170px" maxlength="50" />

<input  type="password" name="password"  style="width: 170px" maxlength="50"  />

</form>

.

.

</html>

perform-cfhttp.cfm

<cfhttp url="https://some-url-that-takes-a-username-and-password" method="post" port="443">
     <cfhttpparam type="formfield" name="sso_id" value="#sso-id#">
     <cfhttpparam type="formfield" name="password" value="#password#">
   </cfhttp>

    This topic has been closed for replies.

    1 reply

    Inspiring
    April 27, 2010

    What does it do instead of working?

    NettlesDAuthor
    Inspiring
    April 27, 2010

    It doesn't log you in.  The form is suppose to pass your username/password and log you into a SSO server.  Using a page with the form works but doesn't if you try to do the same thing with an cfhttp tag.  Maybe you can't do that with a cfhttp tag but I would think so since you can do a post with the tag.