Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

License

Notifications You must be signed in to change notification settings

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

AltStyle によって変換されたページ (->オリジナル) /