2 Home
gitea_admin edited this page 2026-03-11 14:41:48 +00:00

Platform HTTP

Expose HTTP endpoints using the HTTP server available in the current platform.

Metadata

Property Value
Scheme platform-http
Support Level Stable
Labels http
Version 4.10.2

Maven Dependency

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-platform-http</artifactId>
    <version>4.10.2</version>
</dependency>

Endpoint Properties

Name Type Required Default Description
path string The path under which this endpoint serves the HTTP requests, for proxy use 'proxy'
consumes string The content type this endpoint accepts as an input, such as application/xml or application/json. null or */* mean no restriction.
cookieDomain string Sets which server can receive cookies.
cookieHttpOnly boolean false Sets whether to prevent client side scripts from accessing created cookies.
cookieMaxAge integer Sets the maximum cookie age in seconds.
cookiePath string / Sets the URL path that must exist in the requested URL in order to send the Cookie.
cookieSameSite object Lax Sets whether to prevent the browser from sending cookies along with cross-site requests.
cookieSecure boolean false Sets whether the cookie is only sent to the server with an encrypted request over HTTPS.
handleWriteResponseError boolean false When Camel is complete processing the message, and the HTTP server is writing response. This option controls whether Camel should catch any failure during writing response and store this on the Exchange, which allows onCompletion/UnitOfWork to regard the Exchange as failed and have access to the caused exception from the HTTP server.
httpMethodRestrict string A comma separated list of HTTP methods to serve, e.g. GET,POST . If no methods are specified, all methods will be served.
matchOnUriPrefix boolean false Whether or not the consumer should try to find a target consumer by matching the URI prefix if no exact match is found.
muteException boolean true If enabled and an Exchange failed processing on the consumer side the response's body won't contain the exception's stack trace.
populateBodyWithForm boolean true Whether to populate the message Body with a Map containing application/x-www-form-urlencoded form properties.
produces string The content type this endpoint produces, such as application/xml or application/json.
returnHttpRequestHeaders boolean false Whether to include HTTP request headers (Accept, User-Agent, etc.) into HTTP response produced by this endpoint.
useCookieHandler boolean false Whether to enable the Cookie Handler that allows Cookie addition, expiry, and retrieval (currently only supported by camel-platform-http-vertx)
useStreaming boolean false Whether to use streaming for large requests and responses (currently only supported by camel-platform-http-vertx)
bridgeErrorHandler boolean false Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.
exceptionHandler object To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.
exchangePattern object Sets the exchange pattern when the consumer creates an exchange.
fileNameExtWhitelist string A comma or whitespace separated list of file extensions. Uploads having these extensions will be stored locally. Null value or asterisk () will allow all files.
headerFilterStrategy object To use a custom HeaderFilterStrategy to filter headers to and from Camel message.
platformHttpEngine object An HTTP Server engine implementation to serve the requests of this endpoint.