Created
March 29, 2010 15:16
-
-
Save acterry/347940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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