mardi 4 octobre 2016

In Ember, how can I find out the exact URL a call like store.query will hit?

When debugging my API, I want to know, for a given line of code

store.query('foo', {filter: ...})

exactly what URL this causes Ember to hit. Currently, to find this out, I just open devtools and look for the request in the network tab.

This isn't ideal because: * it's harder to find the relevant network request if there are a lot of them * I have to do a whole refresh and wait for the page to load

Is there a better way, maybe a programmatic one using a low-level API? I'm looking for something like:

store.buildRequest('query', 'foo', {filter: ...}).url()




Aucun commentaire:

Enregistrer un commentaire