@prysmex-engineering/ember-fetch-request
v1.0.2
Published
Service for making Fetch requests in Ember applications.
Downloads
1
Readme
ember-fetch-request
Service for making Fetch requests in Ember applications. Mimics the ember-ajax magic. The way it builts the URL, works with the headers, handles errors, and provides a useful service.
- customizable service
- returns RSVP promises
- improved error handling
- ability to specify request headers
Getting started
ember install @prysmex-engineering/ember-fetch-request
To use the fetch service, inject the fetch-request
service into your route or component.
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class AnyRoute extends Route {
@service fetchRequest;
model() {
return this.fetchRequest.request('/posts');
}
}
Fetch Request Service
//TODO: Translate ajax to fetch and update