-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor refactor + README.md file has been added
- Loading branch information
Showing
2 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# **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 | ||
- > **https://www.nuget.org/packages/HttpLoggerMiddleware/1.0.0** | ||
- 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 |