http-client 0.7.7 → 0.7.8
raw patch · 5 files changed
+22/−1 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Network.HTTP.Client: getOriginalRequest :: Response a -> Request
+ Network.HTTP.Client.Internal: [responseOriginalRequest] :: Response body -> Request
+ Network.HTTP.Client.Internal: getOriginalRequest :: Response a -> Request
- Network.HTTP.Client.Internal: Response :: Status -> HttpVersion -> ResponseHeaders -> body -> CookieJar -> ResponseClose -> Response body
+ Network.HTTP.Client.Internal: Response :: Status -> HttpVersion -> ResponseHeaders -> body -> CookieJar -> ResponseClose -> Request -> Response body
Files
- ChangeLog.md +4/−0
- Network/HTTP/Client.hs +1/−0
- Network/HTTP/Client/Response.hs +10/−0
- Network/HTTP/Client/Types.hs +6/−0
- http-client.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for http-client +## 0.7.8++* Include the original `Request` in the `Response`. Expose it via `getOriginalRequest`.+ ## 0.7.7 * Allow secure cookies for localhost without HTTPS [#460](https://github.com/snoyberg/http-client/pull/460)
Network/HTTP/Client.hs view
@@ -181,6 +181,7 @@ , responseHeaders , responseBody , responseCookieJar+ , getOriginalRequest , throwErrorStatusCodes -- ** Response body , BodyReader
Network/HTTP/Client/Response.hs view
@@ -4,6 +4,7 @@ ( getRedirectedRequest , getResponse , lbsResponse+ , getOriginalRequest ) where import Data.ByteString (ByteString)@@ -123,6 +124,7 @@ , responseBody = body , responseCookieJar = Data.Monoid.mempty , responseClose' = ResponseClose (cleanup False)+ , responseOriginalRequest = req {requestBody = ""} } -- | Does this response have no body?@@ -133,3 +135,11 @@ hasNoBody _ 204 = True hasNoBody _ 304 = True hasNoBody _ i = 100 <= i && i < 200++-- | Retrieve the orignal 'Request' from a 'Response'+--+-- Note that the 'requestBody' is not available and always set to empty.+--+-- @since 0.7.8+getOriginalRequest :: Response a -> Request+getOriginalRequest = responseOriginalRequest
Network/HTTP/Client/Types.hs view
@@ -690,6 +690,12 @@ -- be impossible. -- -- Since 0.1.0+ , responseOriginalRequest :: Request+ -- ^ Holds original @Request@ related to this @Response@ (with an empty body).+ -- This field is intentionally not exported directly, but made availble+ -- via @getOriginalRequest@ instead.+ --+ -- Since 0.7.8 } deriving (Show, T.Typeable, Functor, Data.Foldable.Foldable, Data.Traversable.Traversable)
http-client.cabal view
@@ -1,5 +1,5 @@ name: http-client-version: 0.7.7+version: 0.7.8 synopsis: An HTTP client engine description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/http-client>. homepage: https://github.com/snoyberg/http-client