Setting App State from API response

Hello,

I have an action that calls an API call on page load and after checking couple conditions. I have the API JSON Path defined based on response. In the action I have set that on success response it updates the appState and set the value accessToken from API parsed JSON path to token and userId from API as well but it shows null. I downloaded the code and tested it on local machine as well and when printed in the log, print('Status: ${_model.guestLogin!.statusCode}'); print('Response: ${_model.guestLogin!.jsonBody}') the status shows 200 but jsonBody shows its null. Can someone please help me understand what I am doign wrong and how to fix. Below are the screenshots showing the App screen raw body text to check if API call is success. But when I set the text to JSONBody then it shows null

4
9 replies