Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Yesod.Test.Internal
Description
This module exposes functions that are used internally by yesod-test. The functions exposed here are _not_ a stable API—they may be changed or removed without any major version bump.
That said, you may find them useful if your application can accept API breakage.
Synopsis
Documentation
getBodyTextPreview :: ByteString -> Text Source #
Helper function to get the first 1024 characters of the body, assuming it is UTF-8. This function is used to preview the body in case of an assertion failure.
Since: 1.6.10
contentTypeHeaderIsUtf8 :: ByteString -> Bool Source #
Helper function to determine if we can print a body as plain text, for debugging purposes.
Since: 1.6.10
assumedUTF8ContentTypes :: Set ByteString Source #
List of Content-Types that are assumed to be UTF-8 (e.g. JSON).
Since: 1.6.10