function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Controlling Sites-based HTTP Response?

Does anyone know how to programmatically control the VisualForce HTTP response based on an incoming HTTP post parameter?


For example:



<apex:page showHeader="false" contentType="text/xml" controller="HttpController" action="{!processRequest}"> 

<apex:outputPanel rendered="{!action='getmodule'}">
	<Response moduleVersion="3.0.1" schemaVersion="1.0.0" >
<apex:outputPanel rendered="{!action='getcount'}">
	<Response moduleVersion="3.0.1" schemaVersion="1.0.0" >


Or, maybe we can control the XML output in the controller?





Jon Mountjoy_Jon Mountjoy_

That's a good question CloudConversion. I've just checked the Visualforce documentation and see no obvious way to handle response codes.  I did find this idea where you can vote...LMK if you find a solution..