7

I'll keep it simple:
I'd like to download a file via HTTPS; methods I've tried haven't worked (Network.HTTP.Wget, Network.Curl, Network.Download).
Suggestions?
Thanks!

amindfv
  • 8,438
  • 5
  • 36
  • 58
  • 5
    This is a bad question. You need to explain why they haven't worked! I've had great success with both curl and wget. – sclv Aug 03 '11 at 18:36

2 Answers2

6

See the http-enumerator, it works with SSL as well as enumerator/iteratee IO (with the enumerator package). Hence you can pipe it into attoparsec via attoparsec-iterator and efficiently parse the data.

alternative
  • 12,703
  • 5
  • 41
  • 41
3

This question comes up every once in a while:

The solution I use currently is:

import Network.HTTP.Conduit
import qualified Data.ByteString.Lazy as L

main = simpleHttp "https://www.noisebridge.net/wiki/Noisebridge" >>= L.putStr

There is also an explanation of how to post with http-conduit in the link as well as a few answers with other methods.

Community
  • 1
  • 1
Davorak
  • 7,362
  • 1
  • 38
  • 48