Name
Restlet — provides Restlet-based endpoints for consuming and producing RESTful resources
URI format
The URI format for a Restlet endpoint is:
restlet:http://hostname
[:port
][/resourcePattern
][?options
]
The default port is port 80.
Options
Table 5.7 lists the options for a Servlet endpoint.
Table 5.7. Restlet endpoint options
Name | Default | Description |
---|---|---|
headerFilterStrategy | Specifies the bean ID of a header filter strategy in the registry. The strategy
will be plugged into the restlet binding if it is
HeaderFilterStrategyAware . | |
restletBinding | Specifies the bean ID of a RestletBinding object in the
registry. | |
restletMethod | GET | On a producer endpoint, specifies the request method to use. On a consumer
endpoint, specifies that the endpoint consumes only
restletMethod requests. |
restletMethods | Consumer only: Specifies one or more methods
separated by commas to be serviced by a restlet consumer endpoint.
restletMethods takes president over
restletMethod . | |
restletUriPatterns | Consumer only: Specifies one ore more URI
templates to be serviced by a restlet consumer endpoint using the
# notation to reference a List<String> in the
registry. If a URI pattern has been defined in the endpoint URI, both the URI pattern
defined in the endpoint and the restletUriPatterns option will be
honored. |
Message headers
Restlet endpoints use the following message headers:
Name | Type | Description |
---|---|---|
CamelContentType | String | Specifies the content type of the response message. If this header is not set,
the content type is based on the object type of the OUT message body. If the content
type is specified in the IN message, that value determines the content type for the
Restlet request message. Otherwise, the content type is defaulted to
application/x-www-form-urlencoded . |
CamelHttpMethod | String | Specifies the HTTP request method. This is set in the IN message header. |
CamelHttpQuery | String | Specifies the query string of the request URI. It is set on the IN message the endpoint receives a request. |
CamelHttpResponseCode | String or Integer | Specifies the response code to set on the OUT message by the application/processor. The value is the response code of the response message. If this header is not set, the response code is set by the restlet runtime engine. |
CamelHttpUri | String | Specifies the HTTP request URI. This is set in the IN message header. |
CamelRestletLogin | String | Specifies the login name for basic authentication. It is set on the IN message by the application and gets filtered before the restlet request header. |
CamelRestletPassword | String | Specifies the password for basic authentication. It is set on the IN message by the application and gets filtered before the restlet request header. |
org.restlet.* | Specifies the attributes of a Restlet message that get propagated to Apache Camel IN headers. |