force-http-body
This commit is contained in:
parent
17b45eb020
commit
77dfb51d14
|
@ -10,6 +10,7 @@
|
|||
http-body?
|
||||
empty-http-body
|
||||
write-http-body
|
||||
force-http-body
|
||||
in-http-body-chunks)
|
||||
|
||||
(require racket/match
|
||||
|
@ -150,6 +151,12 @@
|
|||
[(? bytes? bs) (list bs)]
|
||||
[(? stream? bss) bss]))
|
||||
|
||||
;; (force-http-body bdy) -> void?
|
||||
;; bdy : http-body?
|
||||
(define (force-http-body bdy)
|
||||
(when (stream? bdy)
|
||||
(for ([x bdy]) (void))))
|
||||
|
||||
(define (http-body-additional-headers bdy)
|
||||
(match bdy
|
||||
[#f '()]
|
||||
|
|
Loading…
Reference in New Issue