문제

I was wondering if there's a way to detect the response codes on a website using C#? Since C# .NET has HTTP-based methods, I'm assuming that it can be done?

Thank you

도움이 되었습니까?

해결책

The first link on google search reveals:

HttpWebResponse rep = req.GetResponse();
HttpStatusCode c = rep.StatusCode;

The link: http://bytes.com/topic/c-sharp/answers/267762-retrieving-http-response-code

다른 팁

Yes, the HTTPWebResponse class contains a statusCode property.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top