[Haskell-cafe] Network.HTTP, BasicAuth+Headers

Tony Morris tonymorris at gmail.com
Mon Oct 4 21:13:01 EDT 2010

I'm trying to send a simple request using Network.HTTP and getting a bit
lost in all the possibilities. I've experimented with both Network.HTTP and
Network.Browser but have been unable to come up with something specific to
my needs, which are quite simple.

I'd like to send a request equivalent to the following curl:

curl --basic -u "user:pass" -H "Accept: application/xml" -H "Content-type:
application/xml" "https://host/path"

It seems with Network.Browser I cannot send headers, but with Network.HTTP I
cannot see how to send the BasicAuth information.

Any tips are appreciated.

Tony Morris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101004/f8cf3774/attachment.html

More information about the Haskell-Cafe mailing list