``` val outputStream = httpClient.put<By...
# ktor
i
Copy code
val outputStream = httpClient.put<ByteWriteChannel>(realUrl).toOutputStream()
        outputStream.write("abc".toByteArray())
        outputStream.flush()
        outputStream.close()
why this won't put data to that link? but with httpurlconnection is ok
r
this might help you https://ktor.io/docs/request.html#specifying-a-body-for-requests TLDR; in your case,
ByteWriteChannel
is type or response body, not request. To send request body use
client.put<ResponseType>(url) { body = ... }
i
@Rustam Siniukov but I need to handle the uploading process, I mean get the percentage of current uploading, body can do that?