aderyabin / sniffer

Log and Analyze Outgoing HTTP Requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request specific middleware parameters

bassemawhoob opened this issue · comments

Use case

What I'm trying to accomplish is store all outgoing request/responses in the DB with a context on this request. I want to be able to, for example, store the logged in user to the database alongside the payload & response body. My current implementation is that I added a middleware class that implements the request & response methods.

Alternative approach

  1. Manually store each request to be able to add any additional parameters
  2. Generate a UID for each request that can be later used

Any alternative approaches or ideas?

Thank you for this great gem