1name:                http-client
2version:             0.7.1
3synopsis:            An HTTP client engine
4description:         Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/http-client>.
5homepage:            https://github.com/snoyberg/http-client
6license:             MIT
7license-file:        LICENSE
8author:              Michael Snoyman
9maintainer:          michael@snoyman.com
10category:            Network
11build-type:          Simple
12extra-source-files:  README.md ChangeLog.md
13cabal-version:       >=1.10
14
15flag network-uri
16   description: Get Network.URI from the network-uri package
17   default: True
18
19library
20  hs-source-dirs:      ., publicsuffixlist
21  exposed-modules:     Network.HTTP.Client
22                       Network.HTTP.Client.MultipartFormData
23                       Network.HTTP.Client.Internal
24  other-modules:       Network.HTTP.Client.Body
25                       Network.HTTP.Client.Connection
26                       Network.HTTP.Client.Cookies
27                       Network.HTTP.Client.Core
28                       Network.HTTP.Client.Headers
29                       Network.HTTP.Client.Manager
30                       Network.HTTP.Client.Request
31                       Network.HTTP.Client.Response
32                       Network.HTTP.Client.Types
33                       Network.HTTP.Client.Util
34                       Network.HTTP.Proxy
35                       Network.PublicSuffixList.Lookup
36                       Network.PublicSuffixList.Types
37                       Network.PublicSuffixList.Serialize
38                       Network.PublicSuffixList.DataStructure
39                       Data.KeyedPool
40  build-depends:       base              >= 4.10   && < 5
41                     , bytestring        >= 0.10
42                     , text              >= 0.11
43                     , http-types        >= 0.8
44                     , blaze-builder     >= 0.3
45                     , time              >= 1.2
46                     , network           >= 2.4
47                     , streaming-commons >= 0.1.0.2 && < 0.3
48                     , containers        >= 0.5
49                     , transformers
50                     , deepseq           >= 1.3    && <1.5
51                     , case-insensitive  >= 1.0
52                     , memory            >= 0.7
53                     , cookie
54                     , exceptions        >= 0.4
55                     , array
56                     , random
57                     , filepath
58                     , mime-types
59                     , ghc-prim
60                     , stm               >= 2.3
61  if flag(network-uri)
62    build-depends: network >= 2.6, network-uri >= 2.6
63  else
64    build-depends: network < 2.6
65
66  if !impl(ghc>=8.0)
67    build-depends: semigroups >= 0.16.1
68
69  -- See build failure at https://travis-ci.org/snoyberg/http-client/jobs/359573631
70  if impl(ghc < 7.10)
71    -- Disable building with GHC before 8.0.2.
72    -- Due to a cabal bug, do not use buildable: False,
73    -- but instead give it an impossible constraint.
74    -- See: https://github.com/haskell-infra/hackage-trustees/issues/165
75    build-depends: unsupported-ghc-version > 1 && < 1
76
77
78  if os(mingw32)
79    build-depends: Win32, safe
80
81  default-language:    Haskell2010
82
83test-suite spec
84  main-is:             Spec.hs
85  type:                exitcode-stdio-1.0
86  hs-source-dirs:      test
87  default-language:    Haskell2010
88  other-modules:       Network.HTTP.ClientSpec
89  build-depends:       base
90                     , http-client
91                     , hspec
92                     , monad-control
93                     , bytestring
94                     , text
95                     , http-types
96                     , blaze-builder
97                     , time
98                     , network
99                     , containers
100                     , transformers
101                     , deepseq
102                     , case-insensitive
103                     , zlib
104                     , async
105                     , streaming-commons >= 0.1.1
106
107
108test-suite spec-nonet
109  main-is:             Spec.hs
110  type:                exitcode-stdio-1.0
111  hs-source-dirs:      test-nonet
112  default-language:    Haskell2010
113  ghc-options:         -threaded
114  if os(windows)
115    cpp-options:       -DWINDOWS
116  other-modules:       Network.HTTP.ClientSpec
117                       Network.HTTP.Client.ResponseSpec
118                       Network.HTTP.Client.BodySpec
119                       Network.HTTP.Client.HeadersSpec
120                       Network.HTTP.Client.RequestSpec
121                       Network.HTTP.Client.RequestBodySpec
122                       Network.HTTP.Client.CookieSpec
123  build-depends:       base
124                     , http-client
125                     , hspec
126                     , monad-control
127                     , bytestring
128                     , cookie
129                     , text
130                     , http-types
131                     , blaze-builder
132                     , time
133                     , network
134                     , network-uri
135                     , containers
136                     , transformers
137                     , deepseq
138                     , case-insensitive
139                     , zlib
140                     , async
141                     , streaming-commons >= 0.1.1
142                     , directory
143