http-conduit 2.3.6.1 → 2.3.7
raw patch · 3 files changed
+9/−2 lines, 3 filesdep +attoparsec
Dependencies added: attoparsec
Files
- ChangeLog.md +4/−0
- Network/HTTP/Simple.hs +3/−1
- http-conduit.cabal +2/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for http-conduit +## 2.3.7++* Ensure entire JSON response body is consumed [#395](https://github.com/snoyberg/http-client/issues/395)+ ## 2.3.6.1 * Add back compatibility with older http-client version [#393](https://github.com/snoyberg/http-client/pull/393)
Network/HTTP/Simple.hs view
@@ -105,6 +105,7 @@ import Control.Monad.Trans.Resource (MonadResource, MonadThrow) import qualified Control.Exception as E (bracket) import Data.Void (Void)+import qualified Data.Attoparsec.ByteString as Atto -- | Perform an HTTP request and return the body as a @ByteString@. --@@ -152,7 +153,8 @@ where req' = addRequestHeader H.hAccept "application/json" req sink orig = fmap (\x -> fmap (const x) orig) $ do- eres1 <- C.sinkParserEither json'+ eres1 <- C.sinkParserEither (json' <* Atto.endOfInput)+ case eres1 of Left e -> return $ Left $ JSONParseException req' orig e Right value ->
http-conduit.cabal view
@@ -1,5 +1,5 @@ name: http-conduit-version: 2.3.6.1+version: 2.3.7 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -23,6 +23,7 @@ library build-depends: base >= 4 && < 5 , aeson >= 0.8+ , attoparsec , bytestring >= 0.9.1.4 , transformers >= 0.2 , resourcet >= 1.1