I am using Chrome Extension (Advanced REST client) to mock sending/receiving my HTTP payload.

Request Screenshot

enter image description here

Response Screenshot

enter image description here

I am following exactly as per the guidelines given in that exercise and I am not sure why I am getting that error message.


enter image description here

Has anyone encountered this error ?


I looked up some POSTS I had done from Postman.

Authorization has a capitol A, and it is Bearer instead of Basic for the Authorization. Here is what my header looks like

Authorization Bearer 00D2C0.....(Token from oAuth)
Content-Type application/json
  • Yeah I was thinking that. Will be interesting to see if it resolves the OP's issue.
    – Adrian Larson
    Jan 30 '17 at 21:49
  • 2
    The issue was not related to Authorization Bearer but was related to my content type header info..Instead of "application/json" I was using "JSON"
    – VPY
    Jan 31 '17 at 4:29

I was facing the same issue. I solved it by stetting the below content type code.

request.setHeader('Content-Type', 'application/json;charset=UTF-8');


If you generate the JSON payload using JSONGenerator, it will work. Setting content-type is not enough. That alone did not resolve the issue for me. use JSONGenerator.

  • 1
    please dont post solutions to trailhead challenges, the question above is specifically related to the content-type header in the request.
    – glls
    Jul 6 '18 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.