Created
February 25, 2020 20:17
-
-
Save lordcodes/75b3216656553636912120e1580c0c62 to your computer and use it in GitHub Desktop.
Code for the article: "Uploading a file with progress in Kotlin"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CountingRequestBody( | |
| private val requestBody: RequestBody, | |
| private val onProgressUpdate: CountingRequestListener | |
| ) : RequestBody() { | |
| override fun contentType() = requestBody.contentType() | |
| @Throws(IOException::class) | |
| override fun contentLength() = requestBody.contentLength() | |
| ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment