How to stop encoding of query params value when we have some special characters in Apache Camel toD uri

2023-05-14 Thread Himanshi Jain
Hi,

We have "/" in a query param as a value which has to be passed on to a rest
API. But as soon as we add it in the header to be used with REST dsl it
gets encoded %252F in the actual url.

url=rest:get:/api/v1/some functionality --> this is saved in
application.properties
parameterA=users/xyz/abc --> saved in exchange header.



Apache camel version used - 3.2.0.x

Can someone help me in how to stop this and pass it as slash(/) itself.

https://stackoverflow.com/questions/76221203/how-to-stop-encoding-of-query-params-value-when-we-have-some-special-characters

Thanks and Regards

Himanshi


Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-14 Thread Fyodor Kravchenko

Hello,

in my little test I'm trying the following,


public class CamelMainTry {
    public static void main(String[] args) throws Exception {
    Main main = new Main();
//    this works but I need to catch more
// 
main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");

//    these don't work:'
// 
main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml");

main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml");
    main.run();
    }
}

my files are located:

deploy/customer/PRIVATE/EXCHANGE/cust.yaml

deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

So there could be more directories in the middle; however it doesn't 
substitute even one.


The Ant-style (or what I'm thinking the Ant style) pattern doesn't seem 
to catch multiple directories. If I specify the directory explicitly it 
works, but I need it to locate the routes in dozens of directories.


How do I fix it?

(While we're at it I would also like to make it reload on the fly for 
the testing purposes, not all of the .yaml files but restricting it to 
my directory structure)


Thanks!

--fedd