...
Camel 2.0
Name | Type | Description |
---|---|---|
Constants HttpConstants.HTTP_URI | String | URI to call. Will override existing URI set directly on the endpoint. Is set on the IN message. |
Constants HttpConstants.HTTP_PATH | String | Request URI's path. Is set on the IN message. |
Constants HttpConstants.HTTP_QUERY | String | URI parameters. Will override existing URI parameters set directly on the endpoint. Is set on the IN message. |
Constants HttpConstants.HTTP_CHARACTER_ENCODING | String | Character encoding. Is set on the IN message. |
Constants HttpConstants.HTTP_CONTENT_TYPE | String | Content type. Is set on the IN message. |
Constants HttpConstants.HTTP_RESPONSE_CODE | int | The http response code from the external server. Is 200 for OK. Is set on the OUT message. |
...
Code Block |
---|
from("direct:start") .setHeader(ConstantsHttpConstants.HTTP_URI, constant("http://newhost")) .to("http://oldhost"); |
...
Code Block |
---|
from("direct:start") .setHeader(ConstantsHttpConstants.HTTP_QUERY, constant("order=123&detail=short")) .to("http://oldhost"); |
...
Code Block |
---|
from("direct:start") .setHeader(ConstantsHttpConstants.HTTP_METHOD, constant(org.apache.camel.component.http.HttpMethods.POST)) .to("http://www.google.com") .to("mock:results"); |
...