We are trying to use Apache Camel2.16.3 to move some data to a third-party endpoint HTTP. We use HTTP4Component. We set uri, method and query parameters as message headers. However, the endpoint contains an underscore ( _), and we get an exception like this:
Apache Camel
HTTP
HTTP4
_
Called: java.lang.IllegalArgumentException: Invalid uri: https://x_y.something.com/somePath?q_one=XXXX&q_two=YYYYY . If you redirect / connect http endpoints, then enable the bridgeEndpoint option at the endpoint: Endpoint [https4: // placeholder? ThrowExceptionOnFailure = false]
I am a little versed, and it looks like _this is something that should not be in the URI. This website actually says it is https://x_y.something.com/somePathinvalid but https://xy.something.com/somePathvalid.
https://x_y.something.com/somePath
https://xy.something.com/somePath
Since I cannot change the third-party endpoint, can underscore be avoided somehow? If not, is there another solution or do we need to give up Apache Camelfor this?
, , , , HTTP- akka, Camel. , , , - , HTTP4, top override . , :
from("jetty:http://localhost:9090/path") .routeId("jetty_server") .log("${body}"); from("timer:sender?delay=3000&period=5000") .setBody().constant("Ping!") .setHeader(Exchange.HTTP_URI, constant("http://localhost:9090/path")) .to("http4:x_y.something.com:9090/path?q_one=XXXX&q_two=YYYYY");
, .
, , .
, , . , , , , () , URI. , , bridgeEndpoint.
, Camel. , , - Camel URI-.
, , ; - , , . , . , , , .
Source: https://habr.com/ru/post/1651131/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1651126/ggplot2-add-diagonals-to-grid&usg=ALkJrhiPie_TPDjDrnWh3VuWk-G81eSXTgSkip plain text with Unicode characters? - unicodeWhen to use a private method in Rails? - ruby-on-railsWebpack dev server livereload on angular 2 template files - javascriptHaskell removeDirectoryRecursive: Permission denied on Windows - windowsMinimum packages needed for a new Angular 2.0.0-rc.5 project? - javascriptMongDB cannot find Promise type definition - node.jsRemove the panel at the top of the IntelliJ editor showing the current scope - intellij-ideaSlow performance of timedelta methods - python-3.xError: "GL / glfw3.h: no such file or directory" when compiling C ++ programs using OpenGL on Linux - c ++All Articles