bytes
svn: r13420
This commit is contained in:
parent
9308d2dddf
commit
7edf96de7a
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
(define (start initial-request)
|
(define (start initial-request)
|
||||||
(make-response/full
|
(make-response/full
|
||||||
200 "Okay"
|
200 #"Okay"
|
||||||
(current-seconds) TEXT/HTML-MIME-TYPE
|
(current-seconds) TEXT/HTML-MIME-TYPE
|
||||||
empty
|
empty
|
||||||
(list (include-template "static.html"))))
|
(list (include-template "static.html"))))
|
||||||
|
|
|
@ -439,21 +439,22 @@ Consider this example:
|
||||||
(output-response/method
|
(output-response/method
|
||||||
conn
|
conn
|
||||||
(make-response/full
|
(make-response/full
|
||||||
200 "Okay"
|
200 #"Okay"
|
||||||
(current-seconds) TEXT/HTML-MIME-TYPE
|
(current-seconds) TEXT/HTML-MIME-TYPE
|
||||||
empty
|
empty
|
||||||
(list (format "hello world ~a"
|
(list (string->bytes/utf-8
|
||||||
|
(format "hello world ~a"
|
||||||
(sort (build-list 100000 (λ x (random 1000)))
|
(sort (build-list 100000 (λ x (random 1000)))
|
||||||
<))))
|
<)))))
|
||||||
(request-method req)))
|
(request-method req)))
|
||||||
#:over-limit 'block))
|
#:over-limit 'block))
|
||||||
(lambda (conn req)
|
(lambda (conn req)
|
||||||
(output-response/method
|
(output-response/method
|
||||||
conn
|
conn
|
||||||
(make-response/full 200 "Okay"
|
(make-response/full 200 #"Okay"
|
||||||
(current-seconds) TEXT/HTML-MIME-TYPE
|
(current-seconds) TEXT/HTML-MIME-TYPE
|
||||||
empty
|
empty
|
||||||
(list "<html><body>Unlimited</body></html>"))
|
(list #"<html><body>Unlimited</body></html>"))
|
||||||
(request-method req))))
|
(request-method req))))
|
||||||
#:port 8080)
|
#:port 8080)
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ the @scheme[list] response type:
|
||||||
If you want more control then you can generate a @scheme[response/full] struct:
|
If you want more control then you can generate a @scheme[response/full] struct:
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(make-response/full
|
(make-response/full
|
||||||
200 "Okay"
|
200 #"Okay"
|
||||||
(current-seconds) TEXT/HTML-MIME-TYPE
|
(current-seconds) TEXT/HTML-MIME-TYPE
|
||||||
empty
|
empty
|
||||||
(list (include-template "static.html")))
|
(list (include-template "static.html")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user