This works:
> (define p (head-impure-port (string->url "http://www.racket-lang.org/")))
> (read-line p)
"HTTP/1.1 200 OK\r"
But, leaving off trailing /, I usually see
> (define p (head-impure-port (string->url "http://www.racket-lang.org")))
string-trim: contract violation
expected: string?
given: #<eof>
Sometimes I get a port with status line "HTTP/1.1 505 HTTP Version not
supported\r".
Can anyone explain? Thanks.
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.