form-alist->http-body
This commit is contained in:
parent
4475e50cc5
commit
8c4b525cbf
|
@ -14,6 +14,7 @@
|
|||
|
||||
http-body?
|
||||
empty-http-body
|
||||
form-alist->http-body
|
||||
write-http-body
|
||||
force-http-body
|
||||
in-http-body-chunks)
|
||||
|
@ -21,6 +22,8 @@
|
|||
(require racket/match
|
||||
racket/port
|
||||
racket/stream
|
||||
net/uri-codec
|
||||
|
||||
"./util.rkt")
|
||||
|
||||
(module+ test
|
||||
|
@ -154,6 +157,11 @@
|
|||
|
||||
(define empty-http-body #f)
|
||||
|
||||
;; (form-alist->http-body al) -> http-body?
|
||||
;; al : (listof (cons/c symbol? string?))
|
||||
(define (form-alist->http-body al)
|
||||
(string->bytes/utf-8 (alist->form-urlencoded al)))
|
||||
|
||||
;; (write-http-body bdy [port]) -> void?
|
||||
;; bdy : http-body?
|
||||
;; port : output-port?
|
||||
|
|
Loading…
Reference in New Issue