jeudi 2 juillet 2015

Ember get current url in RESTadapter

using ember 1.13.2 with ember data 1.13.4 in conjunction with a rails backend.

trying to implement a HMAC authentication with ember and ember data (restadapter)

class AuthHelper
  authHeader: (adapter)->
    ...

Frontend.ApplicationAdapter = DS.RESTAdapter.extend(
  headers: (-> 
    'Authorization': new AuthHelper().authHeader(@)
  ).property().volatile())

for this I need to get the url the request is going to be send to.

how can I get this url? or do I need to construct it manually by collecting host and pluralized models name? where to get the get params ?




Aucun commentaire:

Enregistrer un commentaire