Created
February 22, 2016 15:02
-
-
Save willmanduffy/a2604780d9c52eee95ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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