There is a situation where I am sending a Http Request to my server. The result my server sends is


but the data I am getting on salesforce side from response.getBody() is :


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.

global static string GetDetails(string Id){
    HttpRequest req_objects = new HttpRequest();
    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?

1 Answer 1


That happens because HTTP headers are case-insensitive as you can see in the url: https://stackoverflow.com/questions/5258977/are-http-headers-case-sensitive

  • But here i am talking about response body Sep 20, 2018 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .