@robwatkin wrote:
Hi,
I'm new to ember and I can't seem to get mirage passthrough to work. I'm sure it's something really basic that I'm missing.
I have created a simple ember app at https://github.com/robwatkin/mirg to highlight my problem and raised an issue at https://github.com/samselikoff/ember-cli-mirage/issues/449 which I'll paste below.
Any help or comments at all would be really appreciated as I've been totally stuck on this for a couple of days.
Thanks Rob
Issue #449
I have created a very simple ember app with http-mock for one simple GET endpoint. I can get mirage to return data from a handler in config.js
mirage/config.js
this.get('/api/foofs', function() { return { 'foofs': [ { id: 1, name: 'foo a'}, { id: 2, name: 'foo b'}, { id: 3, name: 'foo c'} ] };
However, when I replace this with a passthrough
this.passthrough('/api/foofs');
ember just seems to hang, browser is empty and console says:
DEBUG: ------------------------------- DEBUG: Ember : 1.13.11 DEBUG: Ember Data : 1.13.15 DEBUG: jQuery : 1.11.3 DEBUG: ------------------------------- XHR finished loading: GET "http://localhost:4200/api/foofs".
Posts: 1
Participants: 1