http-client-websockets 0.1.1.0 → 0.1.1.1
raw patch · 4 files changed
+10/−22 lines, 4 filesdep −doctestdep ~basePVP ok
version bump matches the API change (PVP)
Dependencies removed: doctest
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- doctest/Main.hs +0/−6
- http-client-websockets.cabal +1/−11
- src/Network/HTTP/Client/WebSockets.hs +5/−5
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for http-client-websockets +## 0.1.1.1 -- 2021-01-08++* Documentation updates+ ## 0.1.1.0 -- 2020-10-24 * Added `runClientWithRequest` ([#1](https://github.com/amesgen/http-client-websockets/pull/1) from @tvh).
− doctest/Main.hs
@@ -1,6 +0,0 @@-module Main (main) where--import Test.DocTest--main :: IO ()-main = doctest ["-isrc", "src"]
http-client-websockets.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: http-client-websockets-version: 0.1.1.0+version: 0.1.1.1 synopsis: Glue code for http-client and websockets description:@@ -58,13 +58,3 @@ , http-client-tls , websockets , http-client-websockets--test-suite doctest- import: commons- type: exitcode-stdio-1.0- ghc-options: -threaded -rtsopts -with-rtsopts=-N- main-is: Main.hs- hs-source-dirs: doctest- build-depends:- base- , doctest >= 0.8
src/Network/HTTP/Client/WebSockets.hs view
@@ -14,7 +14,7 @@ -- >>> :set -XOverloadedStrings -- >>> :set -XQuasiQuotes -- >>>--- >>> import Network.HTTP.Client (Manager, newManager, defaultManagerSettings)+-- >>> import Network.HTTP.Client (Manager, defaultManagerSettings) -- >>> import qualified Network.WebSockets as WS -- >>> import qualified Network.HTTP.Client.WebSockets as HCWS -- >>> import Network.URI.Static@@ -27,11 +27,11 @@ -- msg <- WS.receiveData conn -- pure (msg :: ByteString) -- where--- echoUri = [uri|ws://echo.websocket.org|]+-- echoUri = [uri|wss://echo.websocket.org|] -- :} ----- >>> -- this Manager does not support TLS, so we can't use the wss scheme above--- >>> newManager defaultManagerSettings >>= runEchoExample+-- >>> import Network.HTTP.Client.TLS (newTlsManager)+-- >>> newTlsManager >>= runEchoExample -- "hello there" module Network.HTTP.Client.WebSockets ( runClient,@@ -77,7 +77,7 @@ "wss:" -> pure "https:" s -> fail $ "invalid WebSockets scheme: " <> s req <- HTTP.requestFromURI uri {uriScheme = httpScheme}- runClientWithRequest mgr (req { HTTP.requestHeaders = headers }) connOpts app+ runClientWithRequest mgr (req {HTTP.requestHeaders = headers}) connOpts app runClientWithRequest :: -- | 'HTTP.Manager' to use to establish the connection