+ Start a Discussion

Doing an HTTP Post to non-SFDC URL

When a user clicks on a link, I want to open a new window and do an HTTP post to a non-SFDC URL. I don't want to use httpRequest/httpResponse class because the response is greater than 100K and SFDC restricts to 100K.

What is the best way to do this?


SFDC visual force pages only post to SFDC addresses. 


You can put "normal" html tags in VF pages.


You could do something like this:


<form action="http://myserver/endbpoint" method="POST"> <input id=myVar></input> <input type="submit" name="submit"></form>





Thanks Barry...that's exactly the path I went down.....Here is my VF page...I am also submitting the form using Javascript on initial load and hiding the button...Essentially I want to go to the report without user seeing the form at all.




<apex:page showHeader="false" sidebar="false"
<apex:pageMessages />
<form name="searchForm" method="post" action="{!reportsURL}">
<input id="report" type="hidden" name="report" value="{!reportName}" />
<input id="formatOption" type="hidden" name="formatOption" value="{!format}" />
<input id="sessionId" type="hidden" name="sessionId" value="{!sessionId}" />
<input id="reportParameters" type="hidden" name="report Parameters" value="{!reportParameters}" />
<input type="submit" class="button" name="submitButton" id="submitButton" value="Fetching Report" />
var submitButton = document.getElementById("submitButton");
window.onload = new function() { submitButton.click(); };




Message Edited by GoForceGo on 12-22-2009 11:37 AM