error: use application/json as the content-type

Fixes #1584
Did you forget to add the other cases here? :package: 
Merge if you like and I can follow up