Code Monkey home page Code Monkey logo

Comments (4)

nlfurniss avatar nlfurniss commented on August 15, 2024

Hey @mdbiscan!

They can be overridden, and defining your own ajaxOptions is how it's meant to be done. Inside you set any options you want and then call super. No need to define your own munger.

Example:

// adapters/application.js (or whatever adapter you want this to apply to)

export default DS.RESTAdapter.extend(AdapterFetch, {
  ...

  ajaxOptions(url, type, _options) {
    let options = assign({ credentials: 'include' }, _options);

    this._super(url, type, options);
  }

from ember-fetch.

mdbiscan avatar mdbiscan commented on August 15, 2024

Hey @nlfurniss, thanks for your response. I am overriding ajaxOptions in a similar way.

Would it be going too far to suggestion that credentials should be a property from the adapter? This seems more like a setting.

from ember-fetch.

nlfurniss avatar nlfurniss commented on August 15, 2024

Since it's not an official property of an Ember Data adapter, I don't think we want to add it to this mixin, as it's meant to be pretty plug and play.

from ember-fetch.

mdbiscan avatar mdbiscan commented on August 15, 2024

Thanks for the clarification!

from ember-fetch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.