on master help sign in
Derive instance of ‘Show’ for response wrappers
commita6a5aa3b8f51a82e129664273afd781d2d487f3d authorIgnat Insarov <kindaro@gmail.com> dateSun 14 Jun 2020, 00:47 (6 years ago) parent06f149d
2 files changed+9
CHANGELOG.md+5 Network/HTTP/Req.hs+4
CHANGELOG.md+5
@@ -1,3 +1,8 @@
1+## Req 3.3.0
2+
3+* Derived `Show` instances for response types `IgnoreResponse`,
4+ `JsonResponse`, `BsResponse`, and `LbsResponse`.
5+
16## Req 3.2.0
27
38* Made the tests pass with `http-client-0.7` and later.
Network/HTTP/Req.hs+4
@@ -1526,6 +1526,7 @@ httpVersion major minor = withRequest $ \x ->
15261526
15271527-- | Make a request and ignore the body of the response.
15281528newtype IgnoreResponse = IgnoreResponse (L.Response ())
1529+ deriving (Show)
15291530
15301531instance HttpResponse IgnoreResponse where
15311532 type HttpResponseBody IgnoreResponse = ()
@@ -1542,6 +1543,7 @@ ignoreResponse = Proxy
15421543-- monad in which you use 'req' will determine what to do in the case when
15431544-- parsing fails (the 'JsonHttpException' constructor will be used).
15441545newtype JsonResponse a = JsonResponse (L.Response a)
1546+ deriving (Show)
15451547
15461548instance FromJSON a => HttpResponse (JsonResponse a) where
15471549 type HttpResponseBody (JsonResponse a) = a
@@ -1561,6 +1563,7 @@ jsonResponse = Proxy
15611563-- | Make a request and interpret the body of the response as a strict
15621564-- 'ByteString'.
15631565newtype BsResponse = BsResponse (L.Response ByteString)
1566+ deriving (Show)
15641567
15651568instance HttpResponse BsResponse where
15661569 type HttpResponseBody BsResponse = ByteString
@@ -1577,6 +1580,7 @@ bsResponse = Proxy
15771580-- | Make a request and interpret the body of the response as a lazy
15781581-- 'BL.ByteString'.
15791582newtype LbsResponse = LbsResponse (L.Response BL.ByteString)
1583+ deriving (Show)
15801584
15811585instance HttpResponse LbsResponse where
15821586 type HttpResponseBody LbsResponse = BL.ByteString