anaskhan96/soup

How to get http status code?

chuongtrh opened this issue · 1 comments

I want to get the status code from the Http request to make sure the response from the website returns 200 Ok and continue the process.
Sometimes website returns 404

Any way to get the HTTP status code?

I hope that helps: https://github.com/Pauloo27/tuner/blob/master/lyric/main.go#L16

You can use any HTTP client and then use soup.HTMLParse(body).