Created
July 5, 2020 02:13
-
-
Save zentrope/5896699f5bc58826779e42d3c135539d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (http:resolve url) | |
(max-redirect-depth 0) | |
(let* ((uri (uri-reference url)) | |
(request (make-request uri: uri headers: basic-headers))) | |
(display "calling\n") | |
(handle-exceptions exn | |
(lambda (exn) | |
(print-error-message exn) | |
;; (display "lkajsdlkajsdlaskj\n") | |
;; (printf "exn: ~s~%" exn) | |
;; (printf "exn.response: ~s~%" (exn-response exn)) | |
(flush-output) | |
'done) | |
(begin | |
(print "before call") | |
(call-with-input-request* request #f | |
(lambda (p r) | |
(print "got something") | |
(print (response-headers r)) | |
'done)) | |
(print "after call"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment