Advertisement
Guest User

Untitled

a guest
Jul 1st, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module Main where
  2.  
  3. import Text.Printf
  4. import Network.Wreq
  5. import Control.Lens
  6. import qualified Data.ByteString.Lazy.Char8 as B
  7. import Control.Concurrent.Async.Pool
  8. import Network.HTTP.Client
  9.  
  10. main :: IO [()]
  11. main = do
  12.             withTaskGroup 100 (\tg -> mapConcurrently tg process [1..1000])
  13.  
  14. process :: Int -> IO ()
  15. process i = do
  16.              response <- get ("http://167.172.41.106?i=" ++ (show i))
  17.              putStrLn (B.unpack (response ^. Network.Wreq.responseBody))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement