Is it possible to set a wildcard for $httpBackend responses?

Viewed 3619

Suppose I have the following test code in AngularJS:

var someURL;
var dummyJSON;
$httpBackend.whenGET(someURL).respond(dummyJSON);

Is there a way of making this the response for a set of URLs rather than just one? For example, I'd like it to respond with the same dummy JSON for ANY url that starts with /api/, but not ones that start with /app/. Like a wildcard URL ("/app/*") ?

Thanks for the help

2 Answers
Related