Intercepting HTTP requests and responses by building our own middleware

In this section, we will create our own middleware for our existing application. In this middleware, we will log all requests and responses. Let's go through the following steps:

  1. Open Visual Studio.

  1. Open an existing project of the Product APIs by clicking File | Open | Project/Solution (or pressing Ctrl + Shift + O), as shown in the following screenshot:
  1. Locate your solution folder and click Open, as shown in the following screenshot:
  1. Open the solution explorer, ...

Get Building RESTful Web Services with .NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.