Fixes #5061: create generic method to check http status

Also, please clarify how to pass multiple headers in one. Should this contain a big string with line breaks? Should they be separated by commas? Something else? Should it be a slist?