force-http-body
This commit is contained in:
parent
47e830154c
commit
6157a14f37
|
@ -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