Skip to content

@acterry /gist:347940
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Suggested solution to: http://aqlong.posterous.com/convert-c-sharp-http-post-to-coldfusion-cfhtt
<cfhttp url="#variables.URL#"
method="post"
throwonerror="true"
redirect="true"
resolveurl="true"
charset="utf-8">
<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded">
<cfhttpparam type="formfield" name="data" value="#variables.XML_String#">
</cfhttp>
This is based on
Docs for .Net String.Format - http://msdn.microsoft.com/en-us/library/fht0f5be.aspx
Docs for cfHttpParam - http://cfquickdocs.com/cf8/#cfhttpparam
Sample Post - http://developers.sun.com/mobility/midp/ttips/HTTPPost/
According to what I can piece together from the sample post link and String.Format docs referenced above, your .Net code should produce something like this:
POST /login.jsp HTTP/1.1
Host: www.mysite.com
User-Agent: Mozilla/4.0
Content-Length: 27
Content-Type: application/x-www-form-urlencoded
data=escapedHtmlToProducePDF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.