bennythedroid
14 years agoOccasional Contributor
Storing an id from a http response as a property
I'm currently building out test scripts for a project that is still VERY early in development. Currently I can make REST requests on a very basic CRUD level; POST, GET, PUT and DELETES using json values to test certain data fields. Currently the only response I can get when making a POST is a raw 201 Created HTTP message as well the location where the new id was created, for example:
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Location: http:/someservice.someplace.com:8080/TheServiceInDevelopment/rest/contents/randomlygeneratedId
id: randomlygeneratedId
Date: Tue, 11 Oct 2011 15:19:46 GMT
Content-Length: 0
Is there any way to take that id (randomlygeneratedId) and put it in a property or use a property transfer to then get that id for a GET Request?
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Location: http:/someservice.someplace.com:8080/TheServiceInDevelopment/rest/contents/randomlygeneratedId
id: randomlygeneratedId
Date: Tue, 11 Oct 2011 15:19:46 GMT
Content-Length: 0
Is there any way to take that id (randomlygeneratedId) and put it in a property or use a property transfer to then get that id for a GET Request?