Closed Nyholm closed 8 years ago
LGTM, added a few comments.
thanks tobias, you had a busy weekend!
we might expand this to have a limit on each header as well. headers can technically be very long as well, at least up to 1000 characters. having a limit of 100 or 200 would rarely be hit, but if it is hit it would be relevant to not drown a log in gibberish... but this can be added later if somebody wants to make the effort.
Yeah, if we had an MVP, that would be @Nyholm now.
What's in this PR?
A new formatter that show the full HTTP message. The formatter takes a constructor argument to adjust the length of the body. If the length is set to
0
we would only see the headers. (naturally).Why?
I will need this formatter in a (WIP) PR on the HTTPlug bundle. I want to show the changes each Plugin does on the request and responses.
Im not sure this formatter belongs here, but I think there is a fairly common use case to be able to see full requests. If it is rejected here I will push it to the HTTPlug repo.
Checklist