[
https://issues.apache.org/jira/browse/CAMEL-23052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18060241#comment-18060241
]
Claus Ibsen edited comment on CAMEL-23052 at 2/23/26 7:57 AM:
--------------------------------------------------------------
What do you have that is not a string ?
I wonder what you would set as this header that is not a string and thast it
represent a query? Just wonder about real world use-cases.
But never mind you are welcome to send a PR as the change is tiny, and that it
uses existing Camel functionality.
was (Author: davsclaus):
What do you have that is not a string ?
> camel-http-base - typeconverter should be used when providing a HTTP query
> header
> ---------------------------------------------------------------------------------
>
> Key: CAMEL-23052
> URL: https://issues.apache.org/jira/browse/CAMEL-23052
> Project: Camel
> Issue Type: Improvement
> Components: camel-http
> Reporter: Leandro Pachis
> Priority: Minor
> Fix For: Future
>
>
> HttpSendDynamicAware
> [sets|https://github.com/apache/camel/blob/main/components/camel-http-base/src/main/java/org/apache/camel/http/base/HttpSendDynamicAware.java#L114]
> the HTTP query value by casting the header value to type String, which can
> result in a ClassCastException. This can be updated to use a typeconverter
> instead which allows for more safety when converting to a String.
> {code:java}
> exchange.getIn().getHeader(Exchange.HTTP_QUERY, String.class){code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)