Skip to content

Instantly share code, notes, and snippets.

@mugyu
Created March 10, 2012 10:17
Show Gist options
  • Save mugyu/2011065 to your computer and use it in GitHub Desktop.
Save mugyu/2011065 to your computer and use it in GitHub Desktop.
GaucheでhttpファイルをGET
(use rfc.http)
(use rfc.uri)
(define (uri-get uri)
(receive (code status body)
(receive (scheme user-info hostname port path query frament)
(uri-parse uri)
(if (eq? path #f)
(http-get hostname "/")
(http-get hostname path)))
body))
(print (uri-get "http://example.com"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment