Properly treat application/json header

If content-type is specified as application/json, treat request data as JSON rather than a query string.