There is a situation where I am sending a Http Request to my server. The result my server sends is
[{"Data1":"MyData"}]
but the data I am getting on salesforce side from response.getBody() is :
[{"data1":"MyData"}]
As it can be noticed that the first letter of character is changed from capital to small(in case of key 'Data1').
I am using JavaScript remoting, what can be the issue? where i am wrong.
@RemoteAction
global static string GetDetails(string Id){
HttpRequest req_objects = new HttpRequest();
req_objects.setMethod('GET');
req_objects.setEndpoint('https://myDomain.com/Api/Rest/GetDetails?Id='+Id);
req_objects.setHeader('Authorization', 'Bearer '+token);
Http http = new Http();
HTTPResponse res_objects = http.send(req_objects);
return res_objects.getBody();
}
the res_objects.getBody() is getting changed?