Skip to Content
0
Oct 27 at 07:01 AM

How to populate the URL dynamically at runtime of a PUT REST Service

155 Views

I have a PUT REST service i.e. I send in the Request part:

ID: 10023

STREET: Rose

CITY: Trinity

POST CODE: 8181

COUNTRY: ABDEF

The Response part simply contains the ID field, i.e. if the ID is returned we know it was successful:

ID: 10023

To a URL, for example:

https://mysytem.address.net/rest/mine/10023

My REST service works i.e. the information is updated to ID 10023.

My question is, how do I include ID in the URL without hardcoding it? Can this be done using parameters, or is there any other way?

All help greatly appreciated.

PS: Apologies I am not sure why there are such big spaces between the lines in my text above!!