I want to pass path variable using name in web client. I could pass query param by key value pair but how to pass path variable.
For query param, we can do like this by passing key value pair
this.webClient.get()
.uri(uriBuilder - > uriBuilder
.path("/products/")
.queryParam("name", "AndroidPhone")
.queryParam("color", "black")
.queryParam("deliveryDate", "13/04/2019")
.build())
.retrieve();
For path variable, we can do like this by passing value
this.webClient.get()
.uri(uriBuilder - > uriBuilder
.path("/products/{id}/attributes/{attributeId}")
.build(2, 13))
.retrieve();
I want like below
this.webClient.get()
.uri(uriBuilder - > uriBuilder
.path("/products/{id}/attributes/{attributeId}/")
.pathParam("attributeId", "AIPP-126")
.pathParam("id", "5254136")
.build())
.retrieve();