MVC CORE GET API FAILS

Anonymous
2023-09-26T16:47:03.1233333+00:00
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,502 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-09-27T05:32:18.5233333+00:00

    Thanks @AgaveJoe and @Bruce (SqlWork.com)

    
                    if (Res.IsSuccessStatusCode)
                    {
                        //Storing the response details recieved from web api   
                        string json = await Res.Content.ReadAsStringAsync();
    
                        // Parse the JSON response to extract the address
                        dynamic data1 = Newtonsoft.Json.JsonConvert.DeserializeObject(json);
                        string  code = data1.token;
                      
                        TempData["Token"] = code;
                     
    
                    }
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.