...
Name | Type | Description |
---|---|---|
| | URI to call. Will override existing URI set directly on the endpoint. |
| | Request URI's path. |
| | URI parameters. Will override existing URI parameters set directly on the endpoint. |
| | The HTTP response code from the external server. Is 200 for OK. |
| | Character encoding. |
| | The HTTP content type. Is set on both the IN and OUT message to provide a content type, such as |
| | The HTTP content encoding. Is set on both the IN and OUT message to provide a content encoding, such as |
| | From Camel 2.3.0, you can get the HttpServletRequest object from the message header, |
| | From Camel 2.3.0, you can get the HttpServletResponse object from the message header. |
Message Body
Camel will store the HTTP response from the external server on the OUT body. All headers from the IN message will be copied to the OUT message, so headers are preserved during routing. Additionally Camel will add the HTTP response headers as well to the OUT message headers.
...
You can get access to these two using the Camel type converter system using
NOTE from Camel 2.3.0 you can get the request and response not just from the processor after the camel-jetty or camel-cxf endpoint.
Code Block |
---|
Code Block |
HttpServletRequest request = exchange.getIn().getBody(HttpServletRequest.class);
HttpServletRequest response = exchange.getIn().getBody(HttpServletResponse.class);
|
Or you can get access to them from HttpMessage
directly using a type cast:
Code Block |
---|
HttpMessage msg = (HttpMessage) exchange.getIn();
HttpServletRequest request = msg.getRequest();
HttpServletRequest response = msg.getResponse();
|
Configuring URI to call
...