Added a function to return the status code from a response.