I'm working with a large existing project, which utilises javax.ws.rs.client.WebTarget
to talk to RESTful API. The API is developed by a third party and I have no control over it. I need to make a request in the following format:
https://end.point.url/endpoint/id?data
Unfortunately, I can't figure out how to specify such request using WebTarget
. I tried using path("endpoint/id?data")
, but this gets converted into endpoint/id%3Fdata
and I get 404 back. I tried using queryParam
specifying empty value, which gets me endpoint/id?data=
- which results in error required parameter data
missing.
What other option is there? Replacing WebTarget with something else isn't feasible, as it is all over the large project.