DS.RESTAdapter#host

host{String}

Defined in addon/adapters/rest.js:367

An adapter can target other hosts by setting the host property.

app/adapters/application.js
import DS from 'ember-data';

export default DS.RESTAdapter.extend({
  host: 'https://api.example.com'
});

Requests for the Post model would now target https://api.example.com/post/.

doc_EmberJs
2016-11-30 16:50:31
Comments
Leave a Comment

Please login to continue.