Skip to content

Instantly share code, notes, and snippets.

@willmanduffy
Created February 22, 2016 15:02
Show Gist options
  • Select an option

  • Save willmanduffy/a2604780d9c52eee95ff to your computer and use it in GitHub Desktop.

Select an option

Save willmanduffy/a2604780d9c52eee95ff to your computer and use it in GitHub Desktop.
import Ember from 'ember';
function authorizationHeader() {
// I guess I need to inject service:session here and pull the data from it?
// how do?
}
export default Ember.Component.extend(Droplet, {
// options: {
// requestHeaders: {
// 'Authorization': 'this-is-a-request-token'
// }
// },
// The problem with the above is that it's a pain to interpolate the session
// data so I just went ahead and tried a getter? This "works" but I'm not sure
// if it's a best practice and that's why I'm having trouble accessing the
// session.
options: {
requestHeaders: {
get Authorization() {
return authorizationHeader();
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment