Data: headers being a CP may be a poor choice

Created on 12 Aug 2016  路  4Comments  路  Source: emberjs/data

https://github.com/emberjs/data/blob/c6d233b2ba1408f76d54f850bbe47bf8b2ae6982/addon/adapters/rest.js#L215-L228

Volatile is strange, specifically in a world of templates it has a complex meaning and for this use-case a function instead of a CP would more then likely be what we want.

Other motivation is attempting roll back the concept of .volatile some the public API, as most of the time when it is required, it is the source of something else being funky.

cc @krisselden

Documentation

Most helpful comment

I'm in favor of closing this when the docs have been updated to encourage the new flow.

All 4 comments

The ds-improved-ajax feature flag (enabled in the current beta) adds a new headersForRequest method that will become the recommended way to handle this usecase. Users will be encouraged to override headersForRequest instead of declaring a .volatile computed property.

The ds-improved-ajax feature flag (enabled in the current beta) adds a new headersForRequest method that will become the recommended way to handle this usecase. Users will be encouraged to override headersForRequest instead of declaring a .volatile computed property.

Very awesome. Should we close this issue when:

  1. that is enabled by default
  2. the docs are updated to encourage the new flow

Or consider it solved, and close it now?

I'm in favor of closing this when the docs have been updated to encourage the new flow.

As we never landed DS-improved-Ajax and as headers is no longer a volatile property in going to close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

buschtoens picture buschtoens  路  4Comments

toobulkeh picture toobulkeh  路  3Comments

jherdman picture jherdman  路  4Comments

bartocc picture bartocc  路  4Comments

NullVoxPopuli picture NullVoxPopuli  路  5Comments