[racket] Just how to get and print a web page
Hi all:
I am a rookie to racket who used to write some ruby scripts.
Now I meet some problem about how to download a URL and print it or deal the result as a String.
I write like this:
#lang racket
(require net/url)
(define (get url)
(get-impure-port (string->url url)))
Then run:
> (read (get "http://www.google.com"))
'HTTP/1.0
>
Only output part of the total response.
I am confused about this.
How can I read and print all the response page?
Can anyone explain this ?
Thanks very much!
By the way, as a stater on this language ,I found the racket docs very useful.
But sometime can't understand the reference and don't know how people use these functions.
Are there any source code using racket to read?
Thanks,again.
MQ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111029/00a45025/attachment.html>