You cannot do this directly, see for example this post . However, you can use Network.HTTP.Conduitfrom the library http-conduit.
First install it with cabal install http-conduit.
Then you can use this code (note that it contrasts with Network.HTTPuses lazy ByteStrings) as a replacement:
import Network.HTTP.Conduit
import qualified Data.ByteString.Lazy as LB
main = simpleHttp "https://stackoverflow.com"
>>= LB.putStr
libcurl Haskell, libcurl, .