OWIN app.use vs app.run vs app.map

What is the difference between app.use , app.run , app.map in Owin ? When to use what? This is not easy when reading documentation.

+13
source share
1 answer

app.use inserts app.use into the pipeline that requires calling the next middleware by calling next.Invoke ().

app.run inserts middleware without the following, so it just starts.

Using app.map you can map the paths that are evaluated at runtime for each request to run a specific middleware only if the request path matches the pattern that you matched.

See the docs for use and run and map for more details.

+17
source

Source: https://habr.com/ru/post/984522/


All Articles