Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- import Text.Printf
- import Network.Wreq
- import Control.Lens
- import qualified Data.ByteString.Lazy.Char8 as B
- import Control.Concurrent.Async.Pool
- import Network.HTTP.Client
- main :: IO [()]
- main = do
- withTaskGroup 100 (\tg -> mapConcurrently tg process [1..1000])
- process :: Int -> IO ()
- process i = do
- response <- get ("http://167.172.41.106?i=" ++ (show i))
- putStrLn (B.unpack (response ^. Network.Wreq.responseBody))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement