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 ?

3 Answers 3


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
    Commented Jan 30, 2017 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
    Commented Jan 31, 2017 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
    Commented Jul 6, 2018 at 11:57

You must log in to answer this question.

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