mardi 24 novembre 2015

Ember cli adapter set custom path for type

Is it possible to set custom url for a specific type?

For example, this is my adapter definition:

/adapters/application.js

import DS from 'ember-data';

export default DS.JSONAPIAdapter.extend({
    namespace: 'v1',
    defaultSerializer: 'JSONSerializer',
    host: 'http://api.example.com'
});

No what I want is to set a custom url for a specific adapter method. By default, each request will be sent to http://ift.tt/1jhNn0K} but for the store.query() method for example, I would like to tell ember to request http://ift.tt/1P5NhaD

Thank you




Aucun commentaire:

Enregistrer un commentaire