[racket] Just how to get and print a web page

From: MingQian Zhang (zmingqian at qq.com)
Date: Sat Oct 29 04:27:16 EDT 2011

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"))

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?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111029/00a45025/attachment.html>

Posted on the users mailing list.