]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/FuncTorrent/Network.hs
Tracker is a separate thread now
[functorrent.git] / src / FuncTorrent / Network.hs
index eac69c9e32357f42023e0c6f702081039fb32c85..1a569a5737038bfa9437f711d61d51f90de8e290 100644 (file)
@@ -1,7 +1,7 @@
 {-# LANGUAGE OverloadedStrings #-}
 module FuncTorrent.Network
     (
-     get,
+     httpget,
      mkParams
     ) where
 
@@ -17,8 +17,8 @@ import Network.URI (parseURI)
 mkParams :: [(String, ByteString)] -> ByteString
 mkParams params = BC.intercalate "&" [concat [pack f, "=", s] | (f,s) <- params]
 
-get :: String -> [(String, ByteString)] -> IO ByteString
-get url args = simpleHTTP (defaultGETRequest_ url') >>= getResponseBody
+httpget :: String -> [(String, ByteString)] -> IO ByteString
+httpget url args = simpleHTTP (defaultGETRequest_ url') >>= getResponseBody
     where url' = case parseURI $ unpack $ concat [pack url, "?", qstr] of
                    Just x -> x
                    _ -> error "Bad tracker URL"