Skip to content

Instantly share code, notes, and snippets.

@ijp
Created April 12, 2014 16:12
Show Gist options
  • Save ijp/10543607 to your computer and use it in GitHub Desktop.
Save ijp/10543607 to your computer and use it in GitHub Desktop.
(save-module-excursion
(lambda ()
(set-current-module (resolve-module '(web client)))
(eval '(define (extend-request r k v . additional)
(let ((r (build-request (request-uri r)
#:method (request-method r)
#:version (request-version r)
#:headers
(assoc-set! (copy-tree (request-headers r))
k v)
#:port (request-port r)
#:meta (request-meta r))))
(if (null? additional)
r
(apply extend-request r additional))))
(current-module))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment