Represents a HTTP endpoint
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
httpUri | path | producer | true | java.net.URI | The url of the HTTP endpoint to call. | ||
bridgeErrorHandler | parameter | consumer | boolean | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored. | |||
disableStreamCache | parameter | consumer | boolean | Determines whether or not the raw input stream from Jetty is cached or not (Camel will read the stream into a in memory/overflow to file, Stream caching) cache. By default Camel will cache the Jetty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple times. If you use Jetty to bridge/proxy an endpoint then consider enabling this option to improve performance, in case you do not need to read the message payload multiple times. | |||
eagerCheckContentAvailable | parameter | consumer | boolean | Whether to eager check whether the HTTP requests has content if the content-length header is 0 or not present. This can be turned on in case HTTP clients do not send streamed data. | |||
httpMethodRestrict | parameter | consumer | java.lang.String | Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple methods can be specified separated by comma. | |||
matchOnUriPrefix | parameter | consumer | boolean | Whether or not the consumer should try to find a target consumer by matching the URI prefix if no exact match is found. | |||
responseBufferSize | parameter | consumer | java.lang.Integer | To use a custom buffer size on the javax.servlet.ServletResponse. | |||
traceEnabled | parameter | consumer | boolean | Specifies whether to enable HTTP TRACE for this Jetty consumer. By default TRACE is turned off. | |||
exceptionHandler | parameter | consumer (advanced) | org.apache.camel.spi.ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored. | |||
authenticationPreemptive | parameter | producer | boolean | If this option is true, camel-http4 sends preemptive basic authentication to the server. | |||
authMethodPriority | parameter | producer | java.lang.String | Basic Digest NTLM |
Authentication method for proxy, either as Basic, Digest or NTLM. | ||
bridgeEndpoint | parameter | producer | boolean | If the option is true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let the HttpProducer send all the fault response back. | |||
chunked | parameter | producer | true | boolean | If this option is false Jetty servlet will disable the HTTP streaming and set the content-length header on the response | ||
clearExpiredCookies | parameter | producer | true | boolean | Whether to clear expired cookies before sending the HTTP request. This ensures the cookies store does not keep growing by adding new cookies which is newer removed when they are expired. | ||
cookieStore | parameter | producer | org.apache.http.client.CookieStore | To use a custom org.apache.http.client.CookieStore. By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookie shouldn't be stored as we are just bridging (eg acting as a proxy). | |||
copyHeaders | parameter | producer | true | boolean | If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not propagating IN headers). | ||
headerFilterStrategy | parameter | producer | org.apache.camel.spi.HeaderFilterStrategy | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | |||
httpBinding | parameter | producer | org.apache.camel.http.common.HttpBinding | To use a custom HttpBinding to control the mapping between Camel message and HttpClient. | |||
ignoreResponseBody | parameter | producer | boolean | If this option is true, The http producer won't read response body and cache the input stream | |||
okStatusCodeRange | parameter | producer | 200-299 | java.lang.String | The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included. | ||
proxyHost | parameter | producer | java.lang.String | The proxy host name | |||
proxyPort | parameter | producer | int | The proxy port number | |||
throwExceptionOnFailure | parameter | producer | true | boolean | Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code. | ||
transferException | parameter | producer | boolean | If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. | |||
urlRewrite | parameter | producer (advanced) | org.apache.camel.http.common.UrlRewrite | Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints. See more details at http://camel.apache.org/urlrewrite.html | |||
clientBuilder | parameter | advanced | org.apache.http.impl.client.HttpClientBuilder | Provide access to the http client request parameters used on new {@link RequestConfig} instances used by producers or consumers of this endpoint. | |||
clientConnectionManager | parameter | advanced | org.apache.http.conn.HttpClientConnectionManager | To use a custom HttpClientConnectionManager to manage connections | |||
exchangePattern | parameter | advanced | InOnly | org.apache.camel.ExchangePattern | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the default exchange pattern when creating an exchange | |
httpClient | parameter | advanced | org.apache.http.client.HttpClient | Gets the HttpClient to be used by {@link org.apache.camel.component.http4.HttpProducer} | |||
httpClientConfigurer | parameter | advanced | org.apache.camel.component.http4.HttpClientConfigurer | Register a custom configuration strategy for new {@link HttpClient} instances created by producers or consumers such as to configure authentication mechanisms etc | |||
httpClientOptions | parameter | advanced | java.util.Map |
To configure the HttpClient using the key/values from the Map. | |||
httpContext | parameter | advanced | org.apache.http.protocol.HttpContext | To use a custom HttpContext instance | |||
synchronous | parameter | advanced | false | boolean | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). |