web-response-successful?

This commit is contained in:
Tony Garnock-Jones 2016-11-22 09:16:08 +13:00
parent c8b7be22cc
commit 4d6a2986d5
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@
(rename-out [web-response-header <web-response-header>])
(struct-out/defaults [make-web-response-header web-response-header])
web-response-header-code-type
web-response-successful?
(struct-out web-response-complete)
(struct-out web-response-chunked)
(rename-out [web-response-websocket <web-response-websocket>])
@ -101,6 +102,9 @@
[(<= 500 code 599) 'server-error]
[else 'other]))))
(define (web-response-successful? rh)
(eq? (web-response-header-code-type rh) 'successful))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Ground-level communication messages