Updated curl_response to handle multiple HTTP status codes in the response