Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Undertow ComponentAvailable as of Camel 2.16 The undertow component provides HTTP-based endpoints for consuming and producing HTTP requests. That is, the Undertow component behaves as a simple Web server. Maven users will need to add the following dependency to their <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-undertow</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> URI formatundertow:http://hostname[:port][/resourceUri][?options] You can append query options to the URI in the following format, Options
Message HeadersCamel uses the same message headers as the HTTP component. Camel also populates all request.parameter and request.headers. For example, given a client request with the URL, Component OptionsThe
Producer ExampleThe following is a basic example of how to send an HTTP request to an existing HTTP endpoint. in Java DSL from("direct:start").to("undertow:http://www.google.com"); or in Spring XML <route> <from uri="direct:start"/> <to uri="undertow:http://www.google.com"/> <route> Consumer ExampleIn this sample we define a route that exposes a HTTP service at <route> <from uri="undertow:http://localhost:8080/myapp/myservice"/> <to uri="bean:myBean"/> </route> Usage of localhost When you specify If you need to expose a Jetty endpoint on a specific network interface, the numerical IP address of this interface should be used as the host. If you need to expose a Jetty endpoint on all network interfaces, the To listen across an entire URI prefix, see How do I let Jetty match wildcards. If you actually want to expose routes by HTTP and already have a Servlet, you should instead refer to the Servlet Transport.
|