Waits for a response from the server and parses any headers that are sent. This function will block until the final response is received.
If handle_redirects
is true and the request has no payload, then this function will automatically follow redirects. If a request payload is present, then this function will error with error.CannotRedirect.