Skip to content

Instantly share code, notes, and snippets.

Embed
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 = "https://typeclasses.com"
fetch url action =
do
req <- parseRequest url
m <- newManager tlsManagerSettings
withHTTP req m action
main =
fetch url $ \response ->
P.sum (responseBody response >-> P.map 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.