fix set content-type to application/json

Fix #313