08 Mar 2022
11:56 PM
- last edited on
16 Jun 2023
10:30 AM
by
Karolina_Linda
How to extract the response from Rest method execution?
For example
Request
{
"StoreNumber": "30", "PosNumber": "3", "CashierNumber": "003", "IPAddress": "2.198.131.1“
}
Response:
{
"Success":true,"ErrorCode":"0000","Message":"La operacion ha sido completada","Payload":[{"TokenPosars":"eyJhbGciOdI1NiIsInR5cCI6IkpXVCJ9.
}
Is possible extract the "Success", ErrorCode" , etc??
Saludos
Solved! Go to Solution.
The only way is to extract it from the code from the method in your code where the value is located before the JSON is generated. You must define a request attribute and collect the data using .Net method parameter(s). See the documentation if you are not sure.
There is no option to parse the response payload to extract value.