You need to sign in to do that
Don't have an account?
pooja biswas
Post Vs Get in apex integration
Hi
Please let me know practical use case differences between POST method and GET method with specific example.
I know that in GET method we can use parameters but not in POST method, but not sure exactly in what scenarrio we need to use.
Thanks
pooja
Please let me know practical use case differences between POST method and GET method with specific example.
I know that in GET method we can use parameters but not in POST method, but not sure exactly in what scenarrio we need to use.
Thanks
pooja
In both POST and GET you can use parameters in URL.
The one major and simple difference I will say is the payload (Data/records etc as JSON) which can be passed as a response body in POST where as in GET it is not allowed
All Answers
This applies to Salesforce and the rest of you web projects. GET parameters are sent in the URL and that's quiet insecure & easy to change. POST parameters are sent in the message and are secured by https. In general terms I'd always go with POST.
A general comparisson: http://www.w3schools.com/tags/ref_httpmethods.asp
If you find this helpful, please mark as best answer!
Please check below post
1) http://amitsalesforce.blogspot.in/2016/04/rest-api-in-salesforce-execute-rest-api.html
2) http://amitsalesforce.blogspot.in/2016/06/rest-explorer-using-workbench-execute.html
3) http://amitsalesforce.blogspot.in/2016/06/insert-update-delete-record-by-rest-api.html
1) Create a record
Method :- Post
URL:- /services/data/v36.0/sobjects/Account/
Request Body :-
2) Retrieve a record
Method :- Get
URL:- /services/data/v36.0/sobjects/Account/0019000001hE8af
Let us know if this will help you
Thanks
Amit Chaudhary
In both POST and GET you can use parameters in URL.
The one major and simple difference I will say is the payload (Data/records etc as JSON) which can be passed as a response body in POST where as in GET it is not allowed