Skip to main content
Inspiring
January 23, 2009
Question

FIELDNAMES need to change to lowercase using cfhttp

  • January 23, 2009
  • 2 replies
  • 1022 views
I searched and have come up empty handed.

I'm trying to cfhttp post some form variables to a vendors web page. Their web page needs lowercase form.fieldnames, Coldfusion forces all form.fieldnames to uppercase. What setting/attribute have I over looked?????

In the example: username and email come across as USERNAME and EMAIL

Thanks for the help!
This topic has been closed for replies.

2 replies

Inspiring
January 24, 2009
Who is handling the cfhttp tag?
Inspiring
January 24, 2009
The CFHTTP tag is on my site and post to a vendor's site.

I must not understand your suggestion: <cfset form.fieldnames=lcase(form.fieldnames)>. Because I don't have form object available to my pages unless I post to my site.

Thanks.
Inspiring
January 25, 2009
> Coldfusion forces all form.fieldnames to uppercase.

In the fieldnames variable yes. But I do not think that is the case with the raw request data, which is what the other server receives. Post the data to a test page and look at the GetHttpRequestData() content. The case of the field names should be the same as in your cfhttpparam tags.
Inspiring
January 23, 2009
<cfset form.fieldnames=lcase(form.fieldnames)>
Inspiring
January 24, 2009
If I was handling the post page that would work...of course if I were handling the post page in CF it wouldn't matter as CF is case insensitive.

I'm using cfhttp to post to an external non-cf site that is expecting lowercase fieldnames, which should redirect to that site if Statuscode=200. When cf pass the http request, it makes all the fieldnames uppercase.