We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d6167e commit 556f143Copy full SHA for 556f143
fetch2/src/main/java/com/tonyodev/fetch2/HttpUrlConnectionDownloader.kt
@@ -61,12 +61,7 @@ open class HttpUrlConnectionDownloader @JvmOverloads constructor(
61
}
62
63
fun isResponseOk(responseCode: Int): Boolean {
64
- return when (responseCode) {
65
- HttpURLConnection.HTTP_OK,
66
- HttpURLConnection.HTTP_PARTIAL,
67
- HttpURLConnection.HTTP_ACCEPTED -> true
68
- else -> false
69
- }
+ return responseCode in 200..299
70
71
72
override fun disconnect(response: Downloader.Response) {
0 commit comments