Getting an error when making a api call [Solved]

nvm i got it i need to use while ((line = reader.readLine()) != null)