error: use application/json as the content-type

Fixes #1584