I'm working on a task to create a Jersey client. I'm using Jersey 1.18. The target URL looks like below.
https://api.test.com/test/{id}?param1=test1¶m2=test2
I need to add a PathParam
to my WebResource
to call this URL. I see an option to add the QueryParam
but not for PathParam
. My code looks something like this.
Client client = Client.create();
WebResource webResource = client.resource("https://api.test.com/test/{id}")
.queryParam("param1", "test1")
.queryParam("param2", "test2");
Can anyone please help me with this?