Fixes #5061: create generic method to check http status

I'm making another test for this one, to avoid class name collision