headers{Object}
Some APIs require HTTP headers, e.g. to provide an API key. Arbitrary headers can be set as key/value pairs on the RESTAdapter
's headers
object and Ember Data will send them along with each ajax request. For dynamic headers see headers customization.
app/adapters/application.js
import DS from 'ember-data'; export default DS.RESTAdapter.extend({ headers: { "API_KEY": "secret key", "ANOTHER_HEADER": "Some header value" } });
Please login to continue.