You need to sign in to do that
Don't have an account?

http post method issue
Hi all
I have create the following Restfull Http webservice in Apex
RestResource(urlMapping='/sfdcWebservice/*')
global class RESTCaseController {
@HttpPost
global static String GetXml()
{
try
{
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 :https://ap1.salesforce.com/services/apexrest/sfdcWebservice
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.