(content-length-response response)
Adds a Content-Length header to the response. See: wrap-content-length.
Adds a Content-Length header to the response. See: wrap-content-length.
(body-size-in-bytes body response)
Return the number of bytes that an object will require when it is serialized as a response body. This number will be placed in the Content-Length header of the response by the wrap-content-length middleware. If the number of bytes cannot be ascertained, nil is returned.
Return the number of bytes that an object will require when it is serialized as a response body. This number will be placed in the Content-Length header of the response by the wrap-content-length middleware. If the number of bytes cannot be ascertained, nil is returned.
(wrap-content-length handler)
Middleware that adds a Content-Length header to the response, if the response body satisfies the ContentLength protocol.
Middleware that adds a Content-Length header to the response, if the response body satisfies the ContentLength protocol.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close