Search in sources :

Example 1 with HttpServletResponseWrapper

use of com.netflix.zuul.http.HttpServletResponseWrapper in project zuul by Netflix.

the class ZuulRunner method init.

/**
     * sets HttpServlet request and HttpResponse
     *
     * @param servletRequest
     * @param servletResponse
     */
public void init(HttpServletRequest servletRequest, HttpServletResponse servletResponse) {
    RequestContext ctx = RequestContext.getCurrentContext();
    if (bufferRequests) {
        ctx.setRequest(new HttpServletRequestWrapper(servletRequest));
    } else {
        ctx.setRequest(servletRequest);
    }
    ctx.setResponse(new HttpServletResponseWrapper(servletResponse));
}
Also used : HttpServletRequestWrapper(com.netflix.zuul.http.HttpServletRequestWrapper) HttpServletResponseWrapper(com.netflix.zuul.http.HttpServletResponseWrapper) RequestContext(com.netflix.zuul.context.RequestContext)

Aggregations

RequestContext (com.netflix.zuul.context.RequestContext)1 HttpServletRequestWrapper (com.netflix.zuul.http.HttpServletRequestWrapper)1 HttpServletResponseWrapper (com.netflix.zuul.http.HttpServletResponseWrapper)1