Salesforce Visualforce Page

Salesforce

Simple Outbound REST API with XML Response using Apex in Salesforce

Remote Site Settings: Visualforce Page: <apex:page controller="RESTAPIXMLResponseController"> <apex:form> <apex:pageBlock> <apex:pageBlockSection> <apex:pageBlockSectionItem>Customer No: <apex:inputText value="{!strCustomerNo}"/></apex:pageBlockSectionItem> </apex:pageBlockSection> <apex:pageBlockButtons location="bottom"> <apex:commandButton value="Fetch" action="{!fetchAPI}"/> </apex:pageBlockButtons> </apex:pageBlock> <apex:pageBlock> <apex:repeat value="{!mapCustomer}" var="c"> {!c} - {!mapCustomer[c]}<br/> </apex:repeat> ....

Salesforce

Simple Outbound REST API with JSON Response using Apex in Salesforce

Remote Site Settings: Visualforce Page: <apex:page controller="RESTAPIJSONResponseController"> <apex:form> <apex:pageBlock> <apex:pageBlockButtons location="bottom"> <apex:commandButton value="Fetch" action="{!fetchAPI}"/> </apex:pageBlockButtons> </apex:pageBlock> <apex:pageblock> <apex:pageBlockSection> <apex:pageBlockTable value="{!listWrapper}" var="obj"> <apex:column value="{!obj.id}" headerValue="Id"/> <apex:column value="{!obj.login}" headerValue="Login"/> <apex:column value="{!obj.url}" headerValue="URL"/> ....