Skip to content

Instantly share code, notes, and snippets.

@umanomata
Created August 19, 2015 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umanomata/457016fca74b200c4655 to your computer and use it in GitHub Desktop.
Save umanomata/457016fca74b200c4655 to your computer and use it in GitHub Desktop.
scheme@(guile-user)> (use-modules (rnrs io ports) (web client) (web response) (web uri))
scheme@(guile-user)> (define text-url "http://composingprograms.com/shakespeare.txt")
scheme@(guile-user)> (define server-response (http-get (string->uri text-url) #:keep-alive? #true))
scheme@(guile-user)> (get-string-all (response-body-port server-response))
ERROR: In procedure string-index:
ERROR: In procedure string-index: Wrong type argument in position 1 (expecting string): #<eof>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment