2

I use in-memory-web-api like this:

imports: [
    BrowserModule,
    HttpClientModule,
    AppRoutingModule,
    environment.production ?
      [] : HttpClientInMemoryWebApiModule.forRoot(InMemoryDataService, { delay: 100, passThruUnknownUrl: true }),
    // ...
  ],

However, now, I want to use HttpClientInMemoryWebApiModule in dev modde only for some APIs, because only some APIs need to be mocked and not yet have a "real" API to use.

I saw this very similar question, but passThruUnknownUrl does it did not work and I want to explicitly define, which URLs to fake and not to fake.

Also passThruUnknownUrl does not help, if you just want to use your server API and ignore one locally mocked API for a test, e.g.

rugk
  • 4,755
  • 2
  • 28
  • 55

0 Answers0