If content-type is specified as JSON, treat data as JSON rather than a query string