Our developers are using _links to define a series of links in any given response e.g.
"_links": {
"personImage": "/personImage/image/1"}
Would link to the API to return images. From what I read, this is all good using HAL.
But, in order to chain postman requests together I am trying to extract the relative URL to formulate a full URL using a HostName environment variable using the code below and the script is failing.
postman.setEnvironmentVariable("imageURL",jsonData._links.personImage)
What am I missing here? I've tried escaping it using / to no avail.
Aucun commentaire:
Enregistrer un commentaire