Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One simple alternative would be to use the <a href="http://hackage.haskell.org/package/curl" rel="nofollow">curl</a> package. It supports HTTP, HTTPS and a bunch of other alternative protocols, as well as <a href="http://hackage.haskell.org/package/curl-1.3.8/docs/Network-Curl-Opts.html#t%3aCurlOption" rel="nofollow">many options</a> to customize its behavior. The price is introducing an external dependency on <a href="http://curl.haxx.se/libcurl/" rel="nofollow">libcurl</a>, required to build the package.</p> <p>Example:</p> <pre><code>import Network.Curl main :: IO () main = do let addr = "https://google.com/" -- Explicit type annotation is required for calls to curlGetresponse_. -- Use ByteString instead of String for higher performance: r &lt;- curlGetResponse_ addr [] :: IO (CurlResponse_ [(String,String)] String) print $ respHeaders r putStr $ respBody r </code></pre> <hr> <p><strong>Update:</strong> I tried to replicate your problem, but everything works for me. Could you post a <a href="http://sscce.org/" rel="nofollow">Short, Self Contained, Compilable, Example</a> that demonstrates the problem? My code:</p> <pre><code>import Control.Monad import qualified Data.Conduit as C import qualified Data.ByteString.Lazy as LBS import Network.HTTP.Conduit simpleHttp'' :: String -&gt; Manager -&gt; C.ResourceT IO (Response LBS.ByteString) simpleHttp'' url manager = do request &lt;- parseUrl url httpLbs request manager main :: IO () main = do let url = "http://i.imgur.com/" count = 100 rs &lt;- withManager $ \m -&gt; replicateM count (simpleHttp'' url m) mapM_ (print . responseStatus) $ rs </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload