Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
formatAsJSONWithHeaders :: OutputFormatterWithDetailsAndHeaders Source #
Same as formatAsJSON
but with response headers included
This is useful for passing arbitrary data from your application out to the WAI layer for it to be logged, but you may need to be careful to subsequently redact any headers which may contain sensitive data.
Since: 3.0.27
:: Request | The WAI request |
-> [ByteString] | Chunked request body |
-> Maybe NominalDiffTime | Optional request duration |
-> Value |
Get the JSON representation for a request
This representation is identical to that used in formatAsJSON
for the
request. It includes:
method
path
queryString
size
- The size of the body, as defined in the request. This may differ from the size of the data passed in the second argument.
body
- The body, concatenated directly from the chunks passed in
remoteHost
httpVersion
headers
If a
is passed in, then additionally the JSON includes:Just
duration
durationMs
- The duration, formatted in milliseconds, to 2 decimal places
This representation is not an API, and may change at any time (within reason) without a major version bump.
Since: 3.1.4