req-url-extra 0.1.0.0 → 0.1.1.0
raw patch · 9 files changed
+38/−46 lines, 9 filesdep −data-default-classdep ~aesondep ~basedep ~hspecsetup-changedPVP ok
version bump matches the API change (PVP)
Dependencies removed: data-default-class
Dependency ranges changed: aeson, base, hspec, modern-uri, req, text
API changes (from Hackage documentation)
Files
- LICENSE +1/−1
- README.md +8/−5
- Setup.hs +1/−1
- lib/Network/HTTP/Req/Url/Extra.hs +1/−1
- lib/Network/HTTP/Req/Url/Extra/URI.hs +1/−1
- req-url-extra.cabal +14/−32
- sample/Main.hs +10/−3
- test/Spec.hs +1/−1
- test/URISpec.hs +1/−1
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2018 Richard Cook+Copyright (c) 2018-2019 Richard Cook Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
README.md view
@@ -1,9 +1,12 @@-# `req-url-extra`--[](https://travis-ci.org/rcook/req-url-extra)+[](https://travis-ci.org/rcook/req-url-extra) [](http://hackage.haskell.org/package/req-url-extra)-[](https://raw.githubusercontent.com/rcook/req-url-extra/master/LICENSE)+[](http://hackage.haskell.org/package/req-url-extra)+[](http://stackage.org/nightly/package/req-url-extra)+[](http://stackage.org/lts/package/req-url-extra)+[](https://raw.githubusercontent.com/rcook/req-url-extra/master/LICENSE) +# req-url-extra+ This package provides helper functions to make working with `Url` from [Req][req] easier. ## Dev guide@@ -51,7 +54,7 @@ [MIT License][licence] -Copyright © 2018, Richard Cook.+Copyright © 2018-2019, Richard Cook. [change-log]: CHANGELOG.md [licence]: LICENSE
Setup.hs view
@@ -1,5 +1,5 @@ ----------------------------------------------------- Copyright (C) 2018, All rights reserved.+-- Copyright (C) 2018-2019, All rights reserved. -------------------------------------------------- module Main (main) where
lib/Network/HTTP/Req/Url/Extra.hs view
@@ -1,7 +1,7 @@ {-| Module : Network.HTTP.Req.Url.Extra Description : Functions for working with Req 'Url'-Copyright : (C) Richard Cook, 2018+Copyright : (C) Richard Cook, 2018-2019 Licence : MIT Maintainer : rcook@rcook.org Stability : stable
lib/Network/HTTP/Req/Url/Extra/URI.hs view
@@ -1,7 +1,7 @@ {-| Module : Network.HTTP.Req.Url.Extra.URI Description : Functions for converting 'URI' to 'Url'-Copyright : (C) Richard Cook, 2018+Copyright : (C) Richard Cook, 2018-2019 Licence : MIT Maintainer : rcook@rcook.org Stability : stable
req-url-extra.cabal view
@@ -1,6 +1,5 @@- name: req-url-extra-version: 0.1.0.0+version: 0.1.1.0 synopsis: Provides URI/URL helper functions for use with Req description: This package provides helper functions for use with URIs and URLs in Req. homepage: https://github.com/rcook/req-url-extra#readme@@ -9,7 +8,7 @@ license-file: LICENSE author: Richard Cook maintainer: rcook@rcook.org-copyright: 2018 Richard Cook+copyright: 2018-2019 Richard Cook category: Network, Web build-type: Simple cabal-version: >= 1.18@@ -23,14 +22,9 @@ library default-language: Haskell2010 hs-source-dirs: lib- ghc-options: -W- -Wall- -Werror=incomplete-patterns- -Werror=missing-methods- -fwarn-unused-imports- build-depends: base >= 4.7 && < 5- , modern-uri- , req+ build-depends: base >= 4.9 && < 4.13+ , modern-uri >= 0.1 && < 0.4+ , req >= 2.0.0 && < 2.1.0 exposed-modules: Network.HTTP.Req.Url.Extra other-modules: Network.HTTP.Req.Url.Extra.URI @@ -41,18 +35,12 @@ ghc-options: -threaded -rtsopts -with-rtsopts=-N- -W- -Wall- -Werror=incomplete-patterns- -Werror=missing-methods- -fwarn-unused-imports- build-depends: aeson- , base >= 4.7 && < 5- , data-default-class- , modern-uri- , req+ build-depends: aeson >= 1.2 && < 1.5+ , base >= 4.9 && < 4.13+ , modern-uri >= 0.1 && < 0.4+ , req >= 2.0.0 && < 2.1.0 , req-url-extra- , text+ , text >= 1.2 && < 1.3 test-suite req-url-extra-test type: exitcode-stdio-1.0@@ -62,15 +50,9 @@ ghc-options: -threaded -rtsopts -with-rtsopts=-N- -W- -Wall- -Werror=incomplete-patterns- -Werror=missing-methods- -fwarn-unused-imports other-modules: URISpec- build-depends: base >= 4.7 && < 5- , hspec- , modern-uri- , req+ build-depends: base >= 4.9 && < 4.13+ , hspec >= 2.2 && < 2.8+ , modern-uri >= 0.1 && < 0.4+ , req >= 2.0.0 && < 2.1.0 , req-url-extra-
sample/Main.hs view
@@ -3,13 +3,20 @@ module Main (main) where import Data.Aeson (Value)-import Data.Default.Class (def)-import Network.HTTP.Req (GET(..), NoReqBody(..), jsonResponse, req, responseBody, runReq)+import Network.HTTP.Req+ ( GET(..)+ , NoReqBody(..)+ , defaultHttpConfig+ , jsonResponse+ , req+ , responseBody+ , runReq+ ) import Network.HTTP.Req.Url.Extra (toUrlHttps) import Text.URI.QQ (uri) main :: IO () main = do let Just (url, opts) = toUrlHttps [uri|https://httpbin.org/get?a=value0&a=value1&b=value3#fragment|]- v <- runReq def $ req GET url NoReqBody jsonResponse opts+ v <- runReq defaultHttpConfig $ req GET url NoReqBody jsonResponse opts print (responseBody v :: Value)
test/Spec.hs view
@@ -1,7 +1,7 @@ {-| Module : Main Description : Main entrypoint for @req-url-extra@ tests-Copyright : (C) Richard Cook, 2018+Copyright : (C) Richard Cook, 2018-2019 Licence : MIT Maintainer : rcook@rcook.org Stability : stable
test/URISpec.hs view
@@ -1,7 +1,7 @@ {-| Module : URISpec Description : Tests for 'URI' module-Copyright : (C) Richard Cook, 2018+Copyright : (C) Richard Cook, 2018-2019 Licence : MIT Maintainer : rcook@rcook.org Stability : stable