What is Salesforce Integration?
Salesforce integration is the process of merging the data and functionality of Salesforce with another application to provide users with a single unified experience. It allows you to provide your team with an ideal mix of features pertaining to both platforms.
These classes expose the HTTP request and response functionality.
Http Class: Use this class to initiate an HTTP request and response.
HttpRequest Class: Use this class to programmatically create HTTP requests like GET, POST, PATCH, PUT, and DELETE.
HttpResponse Class: Use this class to handle the HTTP response returned by HTTP.
Most common HTTP methods:
1. GET : The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.
2. POST : A POST request is used to send data to the server and create the record.
3. PUT : PUT is used to send data to a server to create/update a resource. Replaces all the current representations of the target resource with the uploaded content.
4. PATCH : PATCH is used to update partial resources. For instance, when you only need to update one field of the resource, PUTting a complete resource representation might be cumbersome and utilizes more bandwidth.
5. HEAD : HEAD is almost identical to GET, but without the response body. HEAD transfers the status line and the header section only.
6. DELETE : The DELETE method deletes the specified resource.
7. OPTIONS : The OPTIONS method describes the communication options for the target resource.