Interceptors for adapting the Java HTTP Servlet interfaces.
An interceptor which catches errors, renders them to readable text and sends them to the user. This interceptor is intended for development time assistance in debugging problems in pedestal services. Including it in interceptor paths on production systems may present a security risk by exposing call stacks of the application when exceptions are encountered.
(http-interceptor-service-fn interceptors default-context)
Returns a function which can be used as an implementation of the Servlet.service method. It executes the interceptors on an initial context map containing :servlet, :servlet-config, :servlet-request, and :servlet-response. The terminator-injector, stylobate, and ring-response are prepended to the sequence of interceptors.
An interceptor which transmits a Ring specified response map to an HTTP response. If a later interceptor in this context throws an exception which is not caught, this interceptor will set the HTTP response status code to 500 with a generic error message. Also, if later interceptors fail to furnish the context with a :response map, this interceptor will set the HTTP response to a 500 error.
(set-response servlet-resp resp-map)
An interceptor which creates favorable pre-conditions for further io.pedestal.interceptors, and handles all post-conditions for processing an interceptor chain. It expects a context map with :servlet-request, :servlet-response, and :servlet keys. After entering this interceptor, the context will contain a new key :request, the value will be a request map adhering to the Ring specification. This interceptor supports asynchronous responses as defined in the Java Servlet Specification version 3.0. On leaving this interceptor, if the servlet request has been set asynchronous, all asynchronous resources will be closed. Pausing this interceptor will inform the servlet container that the response will be delivered asynchronously. If a later interceptor in this context throws an exception which is not caught, this interceptor will log the error but not communicate any details to the client. : https://github.com/ring-clojure/ring/blob/master/SPEC : http://jcp.org/aboutJava/communityprocess/final/jsr315/index.html
An interceptor which causes a interceptor to terminate when one of the interceptors produces a response, as defined by ring.util.response/response?
Get default HTTP content-type for `body`.
(write-body-to-stream body output-stream)
Write `body` to the stream output-stream.
(write-body-async body servlet-response resume-chan context)