only set the content type header on POST and PUT, otherwise leave empty or allow user to override. Deals with some servers treating an empty body as invalid json when parsing requests.
fix tests