Skip to content

Instantly share code, notes, and snippets.

@ToddHoff
Created March 16, 2013 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ToddHoff/5178576 to your computer and use it in GitHub Desktop.
Save ToddHoff/5178576 to your computer and use it in GitHub Desktop.
You are missing header "Accept: application/json". The server refuses
to reply unless the client explicitly accepts application/json.
BTW, curl is better. It understands SNI like other modern browsers and
doesn't need to ignore the SSL certificate check:
$ curl -H 'Content-Type: application/json' -H 'Accept:
application/json' --data
'{"jsonrpc":"2.0","method":"allQueryNext","params":["status:open","z",25],"id":1}'
https://gerrit-review.googlesource.com/gerrit/rpc/ChangeListService
{"jsonrpc":"2.0","id":1,"result":{"accounts":{"accounts":[{"id":1003378},...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment