Set the Content-Type when the response body is JSON.stringified

It's more of a convenience than anything else, but if you accept the change I can go delete some lines of code.