Retrive HttpStatusCode using webclient and then extract json In it. For use In C# client applications

92 views Asked by At

For communicating between clients and server sides, I'm using webclient in my applications. when a request returns 200 (means ok) I can use e.result, otherwise it would catch with an invalid data. but each server status code has a meaning MSDN and sometimes it would contain some json data.

How can I handle server HttpStatusCode "except 200" ,and see data (json string) comes in that status using webclient?

postman simply show HttpStatusCode and also json data but how can I do it using webclient?

0

There are 0 answers