Class BuildURLMixin

public

Using BuildURLMixin

To use URL building, include the mixin when extending an adapter, and call buildURL where needed. The default behaviour is designed for RESTAdapter.

Example

import Adapter, { BuildURLMixin } from '@ember-data/adapter';

export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {
  findRecord(store, type, id, snapshot) {
    var url = this.buildURL(type.modelName, id, snapshot, 'findRecord');
    return this.ajax(url, 'GET');
  }
}

Attributes

The host and namespace attributes will be used if defined, and are optional.