[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Problem with http-client egg sample code
From: |
Ulas Türkmen |
Subject: |
[Chicken-users] Problem with http-client egg sample code |
Date: |
Thu, 24 May 2012 13:40:43 +0200 |
Hi guys,
For my next side project, I wanted to use Chicken to improve my
knowledge of Scheme, and to see how fast Chicken scheme can get. I
installed Chicken on my Mac (Snow Leopard) by compiling from source,
since the Macports version gave segmentation faults on installing
eggs. Afterwards, I installed the http egg (specifically, this one:
http://wiki.call-cc.org/eggref/3/http), and copied the test code for
the client into the file test.scm, whose contents look like this:
#!/usr/local/bin/csi -s
(require-extension http-client)
(define-values (h a i o) (http:send-request "http://google.com"))
(pretty-print (http:read-body a i))
(close-input-port i)
(close-output-port o)
Afterwards, I ran ./test.scm in the command line, and got the
following error output:
Error: unbound variable: http:send-request
Call history:
make-string
make-parameter
<syntax> (define-values (h a i o) (http:send-request
"http://google.com"))
<syntax> (##sys#call-with-values (##core#lambda ()
(http:send-request "http://google.com")) (##core#lambda (h......
<syntax> (##core#lambda () (http:send-request
"http://google.com"))
<syntax> (##core#begin (http:send-request "http://google.com"))
<syntax> (http:send-request "http://google.com")
<syntax> (##core#lambda (h176 a177 i178 o179) (##core#set! h
h176)
(##core#set! a a177) (##core#set! i i178) ...
<syntax> (##core#begin (##core#set! h h176) (##core#set! a
a177)
(##core#set! i i178) (##core#set! o o179))
<syntax> (##core#set! h h176)
<syntax> (##core#set! a a177)
<syntax> (##core#begin (##core#set! i i178) (##core#set! o
o179))
<syntax> (##core#set! i i178)
<syntax> (##core#set! o o179)
<eval> (##sys#call-with-values (##core#lambda () (http:send-request
"http://google.com")) (##core#lambda (h......
<eval> (http:send-request "http://google.com") <--
What am I doing wrong here?
Thanks in advance for any help
- [Chicken-users] Problem with http-client egg sample code,
Ulas Türkmen <=