@prysmex-engineering/ember-fetch-request

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i @prysmex-engineering/ember-fetch-request

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

29.1 kB

Total Files

11

Last publish

Collaborators

  • betocantu93
  • grodriguez85