幻影'passthrough`无效

时间:2017-10-30 22:46:18

标签: javascript ember.js ember-cli-mirage

我试图在此Ember project

中使用passthrough进行POST请求
this.passthrough('/thirdeye/entity?entityType=ANOMALY_FUNCTION');

这就是app/mirage/config.js中的调用。 我收到以下错误:

Mirage: Your Ember app tried to POST '/thirdeye/entity?entityType=ANOMALY_FUNCTION',
but there was no route defined to handle this request.
Define a route that matches this path in your
mirage/config.js file. Did you forget to add your namespace?

显然,我已经添加了对配置文件的调用,但它没有被接收。我读到passthrough仅适用于我的项目>= jquery 2.x

有谁知道还有什么可能导致这种情况?

1 个答案:

答案 0 :(得分:0)

我发现问题是我必须做this.passthrough('/thirdeye/***');因为调用有查询参数。它现在有效。