Skip to main content
December 17, 2007
Question

What is best solution?.

  • December 17, 2007
  • 3 replies
  • 496 views
I got a call like this in CF7 code....

<cfhttp method="get" url=" http://prodsrv/userapp/update.cfm?id=#URLEncodedFormat(id)#&name=#URLEncodedFormat(name)#&Email=#URLEncodedFormat(Email)#">

Issue 1:
update.cfm?id
? is not passing in CF7. What is best solution?.


Issue 2 :
Email=#URLEncodedFormat(Email)
@ inside email is decoded to %40.
What is best solution to fix this issue?.
If i change %40 to @, call works fine.


If i copy and paste this in browser..works fine....but dynamic solution is not working.....
http://prodsrv/userapp/update.cfm?id=11101&name=jsmith&Email=jsmith@psoftmail.com
    This topic has been closed for replies.

    3 replies

    December 26, 2007
    Thanks...

    type=formfield or url?.

    It is suppose to be url..right?.
    Inspiring
    December 17, 2007
    Doesn't matter much whether you get or post with all your variables in the url, but it would make your code easier to manage if you changed it to a post and put all your parameters in cfhttpparam tags of type=formfield. Might resolve your missing ID field, too.
    Inspiring
    December 17, 2007
    Hi,

    #1, Have you put <cfhttp> tag inside <cfoutput> and </cfoutput> blocks?.

    #2) Try replacing your "URLEncodedFormat" function with "URLDecode" function.
    Inspiring
    December 17, 2007
    On issue 2:

    Although it isn't clear from the documentation I suspect that cfhttp escapes the contents of the url attribute by default, that is the behavior of the cfhttpparam tag. Try omitting the URLEncodedFormat function.
    December 17, 2007
    Call this way?.

    <cfoutput>
    <cfhttp method="get" url=" http://prodsrv/userapp/update.cfm?id=#id#&name=#name#&Email=#Email#">
    </cfoutput>



    in cfhttp call...post or get...which is best method to call URL?.