You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,45 @@ alongside other features like: auto-generated documentation, error tracking, ana
166
166
167
167
> See the [docs](https://docs.treblle.com/en/integrations/laravel) for this SDK to learn more.
168
168
169
+
## Capturing Original Request Payloads
170
+
171
+
Some applications use middleware to transform incoming request data before processing (e.g., converting legacy API formats to current formats). By default, Treblle captures the request data after all middleware has processed it, which means you'll see the transformed data rather than what the client originally sent.
172
+
173
+
If you need to capture the **original request payload** before any transformations, you can use the `treblle.early` middleware alongside your regular `treblle` middleware.
174
+
175
+
### When to use this feature
176
+
177
+
- Your API has middleware that modifies incoming request data
178
+
- You want to see what clients actually sent vs. what your application processed
179
+
- You need to debug issues related to request transformations
180
+
- You want complete visibility into your API's request lifecycle
181
+
182
+
### How to use it
183
+
184
+
Add the `treblle.early` middleware **before** any middleware that transforms request data, but keep your regular `treblle` middleware in its usual position:
0 commit comments