How to make the request with valid URL string without encoding characters?

221 Views Asked by At

I am making a simple get request for URL:-

http://localhost:9061/demo/v2/outcome?class=ABC&params=(Id=1bf854a3-3146-4a94-a444-1a609fe1893a,ver=1,required=true)

I am using webclient to make get request like:-

    FluxExchangeResult<String> result = webTestClient.get().uri(URL)
    .accept(MediaType.APPLICATION_JSON).header("Authorization", 
    "r0u+.vj6/+2HK.\\uB76F\\u299C")
    .exchange().expectStatus().isOk().returnResult(String.class);

where URL is the above mentioned URL. When i make this request i am getting 404 as my URL is encoded in the form

http://localhost:9061/demo/v2/outcome?class=ABC&params=(Id%3D1bf854a3-3146-4a94-a444-1a609fe1893a,ver%3D1,required%3Dtrue)

Why is the '=' inside the braces is encoded only and how can i correct this?

0

There are 0 best solutions below