Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
"url": "git://github.com/Thimoteus/purescript-simple-request.git"
},
"dependencies": {
"purescript-http": "^1.0.0",
"purescript-aff": "^1.0.0",
"purescript-node-http": "^1.1.0"
"purescript-http": "^2.0.0",
"purescript-aff": "^3.1.0",
"purescript-node-http": "^4.0.0"
},
"devDependencies": {
"purescript-debug": "^1.0.0"
"purescript-debug": "^3.0.0"
},
"resolutions": {
"purescript-prelude": "^3.0.0",
"purescript-maybe": "^3.0.0",
"purescript-monoid": "^3.0.0",
"purescript-invariant": "^3.0.0",
"purescript-newtype": "^2.0.0",
"purescript-control": "^3.0.0"
}
}
6 changes: 3 additions & 3 deletions src/Node/SimpleRequest.purs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Data.Maybe (fromMaybe)

import Control.Bind ((<=<))
import Control.Monad.Aff as Aff
import Control.Monad.Aff.Unsafe (unsafeInterleaveAff)
import Control.Monad.Aff.Unsafe (unsafeCoerceAff)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Exception (Error)
import Control.Monad.Eff.Class (liftEff)
Expand Down Expand Up @@ -115,7 +115,7 @@ writeEndIgnore :: forall a e.(a -> (Client.Response -> Eff (http :: Node.HTTP |
writeEndIgnore r a b sc = do
req <- r a sc
let stream = Client.requestAsStream req
Stream.write stream b (pure unit)
_ <- Stream.write stream b (pure unit)
Stream.end stream (pure unit)

requestImpl :: forall e a b. (a -> b -> Aff.Aff (http :: Node.HTTP | e) Client.Response)
Expand All @@ -128,7 +128,7 @@ requestImpl r a b = do
pure $ resp' { body = body }

getEmptyBuffer :: forall e. Aff.Aff e Buffer.Buffer
getEmptyBuffer = unsafeInterleaveAff buffer
getEmptyBuffer = unsafeCoerceAff buffer
where
buffer :: Aff.Aff ( buffer :: Buffer.BUFFER ) Buffer.Buffer
buffer = liftEff $ Buffer.create 0
Expand Down