Skip to content

Content-Type is internally set to 'application/json' and can't be changed by config object #41

Description

@shershen08

Here: https://github.com/jpillora/jquery.rest/blob/gh-pages/dist/1/jquery.rest.js#L345

   if (data && this.opts.stringifyData && (method !== 'GET' && method !== 'HEAD')) {
      data = stringify(data);
      headers['Content-Type'] = "application/json";
    }

That seems not very handy while working with JSON API format for example (http://jsonapi.org/format/) which requires different content-type.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions