packages feed

servant-multipart 0.11.3 → 0.11.4

raw patch · 3 files changed

+68/−59 lines, 3 filesdep ~http-mediadep ~lensdep ~network

Dependency ranges changed: http-media, lens, network, servant, servant-server

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+0.11.4+------++- Change `upload` to be test-suite+- Support servant-0.16+ 0.11.3 ------ 
exe/Upload.hs view
@@ -6,13 +6,14 @@ import Control.Monad import Control.Monad.IO.Class import Data.Text.Encoding (encodeUtf8)-import Network (withSocketsDo)+import Network.Socket (withSocketsDo) import Network.HTTP.Client hiding (Proxy) import Network.HTTP.Client.MultipartFormData import Network.Wai import Network.Wai.Handler.Warp import Servant import Servant.Multipart+import System.Environment (getArgs)  import qualified Data.ByteString.Lazy as LBS @@ -49,14 +50,18 @@ startServer = run 8080 (serve api upload)  main :: IO ()-main = withSocketsDo $ do-  forkIO startServer-  -- we fork the server in a separate thread and send a test-  -- request to it from the main thread.-  manager <- newManager defaultManagerSettings-  req <- parseRequest "http://localhost:8080/"-  resp <- flip httpLbs manager =<< formDataBody form req-  print resp+main = do+  args <- getArgs+  case args of+    ("run":_) -> withSocketsDo $ do+      forkIO startServer+      -- we fork the server in a separate thread and send a test+      -- request to it from the main thread.+      manager <- newManager defaultManagerSettings+      req <- parseRequest "http://localhost:8080/"+      resp <- flip httpLbs manager =<< formDataBody form req+      print resp+    _ -> putStrLn "Pass run to run"    where form =           [ partBS "title" "World"
servant-multipart.cabal view
@@ -1,68 +1,66 @@-name:                servant-multipart-version:             0.11.3-synopsis:            multipart/form-data (e.g file upload) support for servant+name:               servant-multipart+version:            0.11.4+synopsis:           multipart/form-data (e.g file upload) support for servant description:   This package adds support for file upload to the servant ecosystem. It draws   on ideas and code from several people who participated in the (in)famous   [ticket #133](https://github.com/haskell-servant/servant/issues/133) on   servant's issue tracker.-homepage:            https://github.com/haskell-servant/servant-multipart#readme-license:             BSD3-license-file:        LICENSE-author:              Alp Mestanogullari-maintainer:          alpmestan@gmail.com-copyright:           2016-2017 Alp Mestanogullari-category:            Web, Servant-build-type:          Simple-cabal-version:       >=1.10-extra-source-files:  CHANGELOG.md-tested-with:-  GHC ==8.0.2-   || ==8.2.2-   || ==8.4.4-   || ==8.6.2 +homepage:           https://github.com/haskell-servant/servant-multipart#readme+license:            BSD3+license-file:       LICENSE+author:             Alp Mestanogullari+maintainer:         alpmestan@gmail.com+copyright:          2016-2017 Alp Mestanogullari, 2018-2019 Servant Contributors+category:           Web, Servant+build-type:         Simple+cabal-version:      >=1.10+extra-source-files: CHANGELOG.md+tested-with:        GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.3+ library-  default-language:    Haskell2010-  hs-source-dirs:      src-  exposed-modules:     Servant.Multipart+  default-language: Haskell2010+  hs-source-dirs:   src+  exposed-modules:  Servant.Multipart    -- ghc boot libs   build-depends:-    base            >= 4.9       && < 5,-    bytestring      >= 0.10.8.1  && < 0.11,-    directory       >= 1.3       && < 1.4,-    text            >= 1.2.3.0   && < 1.3,-    transformers    >= 0.5.2.0   && < 0.6+      base          >=4.9      && <5+    , bytestring    >=0.10.8.1 && <0.11+    , directory     >=1.3      && <1.4+    , text          >=1.2.3.0  && <1.3+    , transformers  >=0.5.2.0  && <0.6    -- other dependencies   build-depends:-    http-media      >= 0.7.1.3  && <0.8,-    lens            >= 4.17     && < 4.18,-    resourcet       >= 1.2.2    && <1.3,-    servant         >= 0.15     && <0.16,-    servant-docs    >= 0.10     && <0.15,-    servant-foreign >= 0.15     && <0.16,-    servant-server  >= 0.15     && <0.16,-    wai             >= 3.2.1.2  && <3.3,-    wai-extra       >= 3.0.24.3 && <3.1+      http-media       >=0.7.1.3  && <0.8+    , lens             >=4.17     && <4.18+    , resourcet        >=1.2.2    && <1.3+    , servant          >=0.15     && <0.17+    , servant-docs     >=0.10     && <0.15+    , servant-foreign  >=0.15     && <0.16+    , servant-server   >=0.15     && <0.17+    , wai              >=3.2.1.2  && <3.3+    , wai-extra        >=3.0.24.3 && <3.1 -executable upload-  hs-source-dirs:      exe-  main-is:             Upload.hs-  default-language:    Haskell2010+test-suite upload+  type:             exitcode-stdio-1.0+  hs-source-dirs:   exe+  main-is:          Upload.hs+  default-language: Haskell2010   build-depends:-                base,-                http-client,-                bytestring,-                network,-                servant,-                servant-multipart,-                servant-server,-                text,-                transformers,-                warp,-                wai+      base+    , bytestring+    , http-client+    , network            >=2.8 && <3.1+    , servant+    , servant-multipart+    , servant-server+    , text+    , transformers+    , wai+    , warp  source-repository head   type:     git