DS.RESTAdapter#parseErrorResponse()

parseErrorResponse (responseText) Objectprivate Defined in addon/adapters/rest.js:1086 Parameters: responseText String Returns: Object

DS.RESTAdapter#query()

query (store, type, query) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:475 Called by the store in order to fetch a JSON array for the records that match a particular query. The query method makes an Ajax (HTTP GET) request to a URL computed by buildURL, and returns a promise for the resulting payload. The query argument is a simple JavaScript object that will be passed directly to the server as parameters. Parameters: store DS.Store type DS.Model que

DS.RESTAdapter#isSuccess()

isSuccess (status, headers, payload) Boolean Defined in addon/adapters/rest.js:945 Available since 1.13.0 Default handleResponse implementation uses this hook to decide if the response is a success. Parameters: status Number headers Object payload Object Returns: Boolean

DS.RESTAdapter#methodForRequest()

methodForRequest (params) Stringpublic Defined in addon/adapters/rest.js:1254 Get the HTTP method for a request. Parameters: params Object Returns: String HTTP method

DS.RESTAdapter#host

host{String} Defined in addon/adapters/rest.js:367 An adapter can target other hosts by setting the host property. app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ host: 'https://api.example.com' }); Requests for the Post model would now target https://api.example.com/post/.

DS.RESTAdapter#isInvalid()

isInvalid (status, headers, payload) Boolean Defined in addon/adapters/rest.js:960 Available since 1.13.0 Default handleResponse implementation uses this hook to decide if the response is a an invalid error. Parameters: status Number headers Object payload Object Returns: Boolean

DS.RESTAdapter#headersForRequest()

headersForRequest (params) Objectpublic Defined in addon/adapters/rest.js:1311 Get the headers for a request. By default the value of the headers property of the adapter is returned. Parameters: params Object Returns: Object headers

DS.RESTAdapter#headers

headers{Object} Defined in addon/adapters/rest.js:384 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" } });

DS.RESTAdapter#groupRecordsForFindMany()

groupRecordsForFindMany (store, snapshots) Array Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:822 Organize records into groups, each of which is to be passed to separate calls to findMany. This implementation groups together records that have the same base URL but differing ids. For example /comments/1 and /comments/2 will be grouped together because we know findMany can coalesce them together as /comments?ids[]=1&ids[]=2 It also supports urls where ids are passed

DS.RESTAdapter#handleResponse()

handleResponse (status, headers, payload, requestData) Object | DS.AdapterError Defined in addon/adapters/rest.js:886 Available since 1.13.0 Takes an ajax response, and returns the json payload or an error. By default this hook just returns the json payload passed to it. You might want to override it in two cases: Your API might return useful results in the response headers. Response headers are passed in as the second argument. Your API might return errors as successful responses with stat