force-http-body
This commit is contained in:
parent
47e830154c
commit
6157a14f37
|
@ -10,6 +10,7 @@
|
||||||
http-body?
|
http-body?
|
||||||
empty-http-body
|
empty-http-body
|
||||||
write-http-body
|
write-http-body
|
||||||
|
force-http-body
|
||||||
in-http-body-chunks)
|
in-http-body-chunks)
|
||||||
|
|
||||||
(require racket/match
|
(require racket/match
|
||||||
|
@ -150,6 +151,12 @@
|
||||||
[(? bytes? bs) (list bs)]
|
[(? bytes? bs) (list bs)]
|
||||||
[(? stream? bss) bss]))
|
[(? 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)
|
(define (http-body-additional-headers bdy)
|
||||||
(match bdy
|
(match bdy
|
||||||
[#f '()]
|
[#f '()]
|
||||||
|
|
Loading…
Reference in New Issue