I'm using a tHttpRequest in GET mode. when I send a link without spaces or special characters like "€", it works very well. As soon as there is a space or other special character in my data it returns me a message "400 bad request". When I put the same link on an explorer it goes very well. I also tried with a tRest but I have the same message. I tried to make an URLEncoder.encode in UTF-8, but here it crashes.
Can you help me please ?
I have almost the same type of error.
I'm trying to send an OData query via tRest component, and have a filter like "CFISCYEAR eq 2018" in my URL.
Because of the spaces I have in this filter, I get a java.lang error : IllegalArgumentException: Illegal character in query at index 146.
Any help would be welcome and appreciated
Wrap your URL within this code.....
Thank you for your reply.
Unfortunately, it's not working for me :
com.sun.jersey.api.client.ClientHandlerException: java.lang.IllegalArgumentException: URI is not absolute
Yours is a completely different issue. Can you raise a new question and include screenshots of your configuration. There is not enough information here.
Thank you, I opened a new topic :
Yes @jarmoud_4 I went into more detail here: https://community.talend.com/t5/Design-and-Development/tRest-using-OData-URL-with-blank-space/m-p/11...
I was kind of expecting it to be more of a clue than an unquestioned solution, if I am honest. Essentially you need to encode everything that is not a functional part of the URL. This means that in URLs with parameters built in, it may only just be the parameter sections.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Learn how and why companies are moving to the Cloud