Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import Pipes
import Pipes.HTTP
import qualified Pipes.Prelude as P
import qualified Pipes.ByteString as PB
import qualified Data.ByteString as BS
url = ""
fetch url action =
req <- parseRequest url
m <- newManager tlsManagerSettings
withHTTP req m action
main =
fetch url $ \response ->
P.sum (responseBody response >-> BS.length)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.