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
Amritesh SinghAmritesh Singh 

http post method issue

Hi all

I have create the following Restfull  Http webservice in Apex



global class RESTCaseController {

global static String GetXml() 
RestRequest req = RestContext.request;
RestResponse res = Restcontext.response;

blob Body = req.requestbody;
string str=body.toString(); 
catch(Exception E)
system.debug('ERROR :' +e.getMessage());

return null;


End Url :


But this url is not working.


I searched and found that some authentication is required.


what changes i have to make in the code and to my account 

so that external server will be able to post xml to my End url.


Pls help me



You can at first login usinh OAuth .Get the access token.Then add this token in your header and make the rest call.