I have a REST call to Java services which does a POST to the path
localhost:8080/api/xyz
and returns the response. The response of course has the response.header['location'] with a correct location with ID
'xyz/{id}'
For my further steps in the method I just need to extract ONLY the 'id' part from the 'location'. Right now this is what I am doing,
(response.header['location'].split('/'))[1]
Is there a better way to get around this?