title: Can anyone explain why these "Inappropriate blocking method call" warnings pop up from my code?
body: <p>I wrote this code in Kotlin to download some API information using Coroutines for downloading the data. However, the code shows a lot of warnings stating the message as &quot;<strong>Inappropriate blocking method call</strong>&quot;.</p>
  <p>Here's the code:</p>
  <pre><code>class DownloadInfoClass {
      private lateinit var url: URL
      private lateinit var httpURLConnection: HttpURLConnection
      private lateinit var result: String
      private lateinit var inputStream: InputStream
      private lateinit var inputStreamReader: InputStreamReader
      private var dataMap: MutableMap&lt;String, Any&gt; = mutableMapOf()
  
      private fun downloadMethod(urls: String){
          CoroutineScope(IO).launch {
              try {
                  url = URL(urls)
                  httpURLConnection = url.openConnection() as HttpURLConnection
                  inputStream = httpURLConnection.inputStream
                  inputStreamReader = InputStreamReader(inputStream)
  
                  var data: Int = inputStreamReader.read()
                  while (data != -1){
                      val current: Char = data.toChar()
                      result += current
                      data = inputStreamReader.read()
                  }
              }
  
              catch (e: Exception){
                  e.printStackTrace()
              }
          }
          Log.i(&quot;Result: &quot;, result)
      }
  }
  </code></pre>
  <p>The specific areas where this problem occurs is:</p>
  <ol>
  <li><code>URL(urls)</code></li>
  <li><code>openConnection()</code></li>
  <li><code>read()</code></li>
  </ol>
  <p>Can anyone help me understand why this occurs? I read through the Kotlin documentation but I wasn't able to comprehend. Also, could you tell me how to fix this issue?</p>