Liking cljdoc? Tell your friends :D

ring.middleware.content-length


content-length-responseclj

(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.
sourceraw docstring

SizableResponseBodycljprotocol

body-size-in-bytesclj

(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.
source

wrap-content-lengthclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close