“java.lang.NumberFormatException: For input string: “obj.id”” is the error message I’m receiving when I try to retrieve the data using the id (which I set as environment vairable i.e. petid) in the request url.
I’ve included a screenshot of the POST body and scripts along with the get request for reference; kindly assist me in resolving this. Many thanks in advance.
The request payload is JSON so I’m not sure why you’re using pm.request.xml2Json here. What does that even log? Can you use console.log(obj) under that line to see the output of the variable?