I'm trying to scrape data from a site using HTTPS. I managed to make basic requests using Network.HTTP.Conduit successfully (posting credentials, etc.), but failed at extracting cookie information from the response headers (Set-Cookie). It looks like http-conduit has its own mechanism for dealing with cookies, which I failed to understand.
Network.HTTP.Conduit.Browser seems to deal with cookies automatically (which is fine by me), but I couldn't get it to work due to lacking documentation.
Could someone with more experience dealing with the http-conduit browser module show me how to:
- Deal with self-signed certificates (I managed to do this with managerCheckCerts in the base module)
- Send a POST request with URL-encoded parameters in the body, not following any redirects (I used urlEncodedBody from the base module for this)
- Use the cookie from the 2. step in a simple GET request and read the response as a (lazy) ByteString (I would have used httpLbs for this)
To me it looks like the abstraction level of Network.HTTP.Conduit.Browser is more suited for my application compared to Network.HTTP.Conduit, so I would like to make the switch even if I could deal with cookies manually using the latter.