public HttpMessage(Exchange exchange, HttpCommonEndpoint endpoint, HttpServletRequest request, HttpServletResponse response) { setExchange(exchange); setCamelContext(exchange.getContext()); this.endpoint = endpoint; this.request = request; this.response = response; // Put the request and response into the message header this.setHeader(Exchange.HTTP_SERVLET_REQUEST, request); this.setHeader(Exchange.HTTP_SERVLET_RESPONSE, response); // Check the setting of exchange Boolean flag = exchange.getProperty(Exchange.SKIP_WWW_FORM_URLENCODED, Boolean.class); if (flag != null && flag) { this.setHeader(Exchange.SKIP_WWW_FORM_URLENCODED, Boolean.TRUE); } // use binding to read the request allowing end users to use their // implementation of the binding endpoint.getHttpBinding().readRequest(request, this); }