error: use application/json as the content-type

Fixes #1584
Can you turn this into a testtable for the different `Ecode`s?