git.iko.soy/typeable/hjsonschema
on master help sign in
Merge branch 'http-client' of https://github.com/mdorman/hjsonschema into mdorman-http-client
commitd25c36323c21ccb239158e0061c5e106c021ae93 authorIan Grant Jeffries <ian@housejeffries.com> dateMon 30 Mar 2015, 12:32 (12 years ago) parent6b095f7fee036a
3 files changed+6−2
changelog.txt+2 hjsonschema.cabal+1−1 src/Data/JsonSchema/Reference.hs+3−1
changelog.txt+2
@@ -1,3 +1,5 @@
1++ Switch from http-conduit to http-client.
2+
13# 0.5.2
24
35+ Add convenience function for validating and compiling draft 4 schemas
hjsonschema.cabal+1−1
@@ -32,7 +32,7 @@ library
3232 , file-embed >= 0.0.8 && < 0.0.9
3333 , hashable >= 1.2 && < 1.3
3434 , hjsonpointer >= 0.2 && < 0.3
35− , http-conduit >= 2.1.5 && < 2.2
35+ , http-client >= 0.4.9 && < 0.5
3636 , http-types >= 0.8 && < 0.9
3737 , regexpr >= 0.5 && < 0.6
3838 , scientific >= 0.3 && < 0.4
src/Data/JsonSchema/Reference.hs+3−1
@@ -13,7 +13,7 @@ import qualified Data.HashMap.Strict as H
1313import Data.Monoid
1414import Data.Text (Text)
1515import qualified Data.Text as T
16−import Network.HTTP.Conduit
16+import Network.HTTP.Client
1717import Prelude hiding (foldr)
1818
1919combineIdAndRef :: Text -> Text -> Text
@@ -61,3 +61,5 @@ safeGet url =
6161 where
6262 handler :: SomeException -> IO (Either Text ByteString)
6363 handler e = return . Left . T.pack . show $ e
64+ simpleHttp u = withManager defaultManagerSettings $ \man ->
65+ parseUrl u >>= \req -> liftM responseBody $ httpLbs req {requestHeaders = ("Connection", "close") : requestHeaders req } man