call-with-response example pasted by DerGuteMoritz on Tue Feb 12 17:25:10 2013
(use uri-common intarweb http-client) (call-with-response (make-request uri: (uri-reference "http://call-cc.org/")) void (lambda (resp) (let ((len (header-value 'content-length (response-headers resp)))) (print "reading " len " bytes") (print (read-string len (response-port resp))))))
call-with-response pasted by andyjpb on Tue Feb 12 17:31:14 2013
(use http-client intarweb uri-common extras) (call-with-response (make-request uri: (uri-reference "http://www.google.com/")) write-request (lambda (p) (read-string #f (response-port p))))
call added by andyjpb on Tue Feb 12 17:59:28 2013
void is preferred over write-request as the writer is only required to write the request body: not the entire request.