Skip to content

pforro/HttpLoggerMiddleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpLoggerMiddleware

Middleware that records all the data of the incoming requests and outgoing responses into a *.json file.
Recorded attributes: TimeStamp, Route, Method, QueryParameters, Headers, Payload.

If you find this useful, then please hit the star button on my GitHub repo https://github.com/pforro/HttpLoggerMiddleware.git

Usage

  • Install the NuGet package
  • Add the following namespace to the Program.cs file:
    • using HttpLoggerMiddleware;

  • Add the following line to the request pipeline in the Program.cs file:
    • app.UseHttpLogger();

  • Build and Run the web application, send some HTTP requests
  • You can find the log.json file in the following path:
    • [WorkingDirectory]/HttpLogs/log.json

Author

  • Peter Cs. Forro
  • Budapest, Hungary, 2022

About

Middleware that records all the data of the incoming requests and outgoing responses into a *.json file. Recorded attributes: TimeStamp, Route, Method, QueryParameters, Headers, Payload.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages