[Haskell-beginners] Haskell connectTo problem
Brandon Allbery
allbery.b at gmail.com
Sat Jan 5 16:20:43 CET 2013
On Sat, Jan 5, 2013 at 8:25 AM, Alexander 0xAX <
anotherworldofworld at gmail.com> wrote:
> >>>connectTo "httpbin.org/ip" (PortNumber 80)
> *** Exception: getAddrInfo: does not exist (Name or service not known)
>
connectTo is not a web browser, but low level TCP/IP; it wants a hostname,
and only a hostname. If you wanted to write a web browser or HTTP fetch
utility, you would connectTo the host on port 80 and then conduct an HTTP
exchange to GET /ip.
There are higher level libraries if you want to use HTTP without writing it
yourself.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130105/e47a7272/attachment.htm>
More information about the Beginners
mailing list