Haskell curl missing 401 status content

I have some problems with the curlhaskell library in the latest version 1.3.7.

Haskell example:

module CurlTest where

import Network.Curl

url = "http://www.example.com/private/"
opts = [CurlFollowLocation True]

main = withCurlDo $ do
    curlGet url opts
    return ()

I am running this snippet using ghci and I have not received any output. On public sites with a status code of 200, I get the contents of the page. With clean curlfrom the command line, I get the contents of the page even on 401 sites, as expected.

Did I skip the option for haskell- curlcall, or is this a bug? If this is a mistake, is there a workaround or some curlhaskell alternatives?

Hi

+3
source share

All Articles