[Haskell-beginners] Haskell connectTo problem

Kim-Ee Yeoh ky3 at atamo.com
Sat Jan 5 15:10:37 CET 2013


Not knowing anything about the package or the function, my guess is
connectTo wants a domain name, not a URL, because it proceeds to do a DNS
lookup on exactly that.

You probably want a different function. There's something called simpleHTTP
or thereabouts.

-- Kim-Ee


On Sat, Jan 5, 2013 at 8:25 PM, Alexander 0xAX <
anotherworldofworld at gmail.com> wrote:

> Hello,
>
> I try to connect to host:
>
> >>> connectTo "httpbin.org" (PortNumber 80)
> {handle: <socket: 8>}
>
> It's ok. But if i try to connect:
>
> >>>connectTo "httpbin.org/ip" (PortNumber 80)
> *** Exception: getAddrInfo: does not exist (Name or service not known)
>
> Why i got this error?
>
> Thank you.
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130105/261c28db/attachment.htm>


More information about the Beginners mailing list