Hi
Below response is returned by API . I want to display Error message . I am using Asp.net Web Based Applcation C#.
{"status":false,"message":"Pickup Address is required\nPickup State is required\nThe Pickup Pincode field must be exactly 6 characters in length.\n"}
If status is O.K then successful message should be displayed
Thanks
Naimish MakwanaPosted Jan 12, 2023, 6:36 AM
Please refer below code.
Create a class to parse your Response.
Code to Get data from URL and parse it to valid data formate.
Please let me know in case of any issue. Thanks :)
Vishal JoshiPosted Jan 10, 2023, 12:28 PM
Hello
You can try the below code for GET requests.
Thanks
Ramco RamcoPosted Jan 10, 2023, 11:05 AM
Hi Amit
I am getting error IsSucessful response doed not exist in the current context
Thanks
Amit MohantyPosted Jan 10, 2023, 7:21 AM
Check this
Pasang TamangPosted Jan 10, 2023, 7:19 AM
Hi,
Using Newtonsoft.Json, you should be able to achieve what you want. Please check below code for example
Regards,
Pasang