This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,21 @@ Some features are not readily apparent in the basic usage example.
96
96
97
97
The ` InMemoryBackendConfigArgs ` defines a set of options. Add them as the second ` forRoot ` argument:
98
98
` ` ` ts
99
- InMemoryWebApiModule .forRoot (InMemHeroService , { delay: 500 }),
99
+ InMemoryWebApiModule .forRoot (InMemHeroService , { delay: 500 }),
100
100
` ` `
101
101
102
102
**Read the ` InMemoryBackendConfigArgs ` interface to learn about these options**.
103
103
104
+ ## Default delayed response
105
+
106
+ By default this service adds a 500ms delay (see ` InMemoryBackendConfig .delay ` )
107
+ to all requests to simulate round-trip latency.
108
+ You can eliminate that or extend it by setting a different value:
109
+ ` ` ` ts
110
+ InMemoryWebApiModule .forRoot (InMemHeroService , { delay: 0 }), // no delay
111
+ InMemoryWebApiModule .forRoot (InMemHeroService , { delay: 1500 }), // 1.5 second delay
112
+ ` ` `
113
+
104
114
## Simple query strings
105
115
Pass custom filters as a regex pattern via query string.
106
116
The query string defines which property and value to match.
You can’t perform that action at this time.
0 commit comments