EmberJS-Connecting to an Http Server



Connecting to an Http Server

The store uses an adapter to load data from an HTTP server. Ember.js defines the DS.RESTAdapter adapter which communicates with an HTTP server by transmitting JSON via XHR.

The following table lists down the properties of customizing rest adapter −

S.N.Customized Rest Adapters & Description
1

Customizing the Adapter

Customize the REST adapter by exporting a subclass of DS.RESTAdapter.

2

Customizing URLs

If your JSON API is stored other than host root, prefix the url to all requests.

Advertisements