I have an error while trying to connect to the api with my unity app

I’m trying but the program doesnt enter inside the next lines:

using (WebResponse response = request.GetResponse()){
            using (Stream stream = response.GetResponseStream())
            {
                using (StreamReader reader = new StreamReader(stream))
                {
                    string jsonResponse = reader.ReadToEnd();
                    if (response is HttpWebResponse httpWebResponse)
                    {
                        Debug.LogError($"Error ({httpWebResponse.StatusCode}): {httpWebResponse.StatusDescription}\n{jsonResponse}");
                    }
                    StreamInfo streamInfo = JsonUtility.FromJson<StreamInfo>(jsonResponse);
                    streamUrl = streamInfo.data[0].thumbnail_url.Replace("{width}", "1920").Replace("{height}", "1080").Replace("-preview.jpg", ".m3u8");
                }
            }
        }