What’s a simple method of checking if a string contain error 404?
The string was built from HttpGet.
Any help is appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should better check the status code, the result string of a HTTP request is not guaranteed to contain the error code, if the status is 404.
If it’s Apache HTTP client (which it looks like, because you mentioned
HttpGet):