You can simply use traditional http post to a public VF page hosted on force.com site or community site and then process that information in apex controller tied with VF page.
UPDATE:
public with sharing class YourPostEndpointController {
// call this variable on VF page directly i.e. {!ResponseMsg}
public string ResponseMsg{get{
processRequest();
return 'Data populated';
}
set;
}
public YourPostEndpointController(){
}
public void processRequest(){
Map<String, object> parametersMap=new Map<String, object>();
if (ApexPages.currentPage() != null
&& ApexPages.currentPage().getParameters()!=null
&& ApexPages.currentPage().getParameters().size()>0){
parametersMap=ApexPages.currentPage().getParameters();
}
/// do your processing here
}
}
UPDATE 2:
Here's the solution
Post Request VF page
<apex:page showHeader="false">
<h1>Post your data</h1>
<form id="postDataForm" name="postDataForm" method="post"
action="https://bsingh-developer-edition.na34.force.com/ff/SamplePostHandler" enctype="application/x-www-form-urlencoded">
<div><label for="firstname">First name</label><input id="firstname" name="firstname" type="textbox"/></div>
<div><label for="lastname">Last name</label><input id="lastname" name="lastname" type="textbox"/></div>
<div><label for="email">Email</label><input id="email" name="email" type="textbox"/></div>
<div> <input type="submit"
name="btnSubmit"
value="Submit" class="btn"/>
</div> </form>
</apex:page>
Post Handler VF page:
<apex:page showHeader="false" controller="SamplePostHandlerController">
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page
{!ResponseMsg}
<div><label for="firstname">Param 1</label><input id="firstname" type="textbox" value="{!param1}"/></div>
<div><label for="lastname">Param 2</label><input id="lastname" type="textbox" value="{!param2}"/></div>
<div><label for="email">Param 3</label><input id="email" type="textbox" value="{!param3}"/></div>
<!-- End Default Content REMOVE THIS -->
</apex:page>
Post Handler Apex class
public with sharing class SamplePostHandlerController {
public string param1{get;set;}
public string param2{get;set;}
public string param3{get;set;}
// call this variable on VF page directly i.e. {!ResponseMsg}
public string ResponseMsg{get{
processRequest();
return '';
}
set;
}
public SamplePostHandlerController(){
param1='';
param2='';
param3='';
}
public void processRequest(){
Map<String, object> parametersMap=new Map<String, object>();
if (ApexPages.currentPage() != null
&& ApexPages.currentPage().getParameters()!=null
&& ApexPages.currentPage().getParameters().size()>0){
parametersMap=ApexPages.currentPage().getParameters();
}
for(String key: parametersMap.keyset()){
if(key=='firstname'){
param1=parametersMap.get(key)+'';
}
else if(key=='lastname'){
param2=parametersMap.get(key)+'';
}
else if(key=='email'){
param3=parametersMap.get(key)+'';
}
}
/// do your processing here
}
}