Ifvwm
01/13/2021, 3:28 AMgildor
01/13/2021, 3:40 AMgildor
01/13/2021, 3:40 AMinstall(HttpRedirect) {
checkHttpMethod = false
}
gildor
01/13/2021, 3:42 AMgildor
01/13/2021, 3:44 AMIfvwm
01/13/2021, 3:45 AMgildor
01/13/2021, 3:46 AMgildor
01/13/2021, 3:47 AMIfvwm
01/13/2021, 3:55 AMgildor
01/13/2021, 3:56 AMNo transformation found: class io.ktor.utils.io.ByteBufferChannel
gildor
01/13/2021, 3:56 AMIfvwm
01/13/2021, 3:56 AMgildor
01/13/2021, 3:56 AMgildor
01/13/2021, 3:57 AMgildor
01/13/2021, 3:58 AMfollowRedirects = falseIn second one you just completely disabled redirects, so it’s kinda expected that it fails on redirect
Ifvwm
01/13/2021, 3:59 AMval output = client.put<HttpResponse>(addr)
println("this is upload test ${output.headers}")
// I get this headers now
Ifvwm
01/13/2021, 4:00 AMIfvwm
01/13/2021, 4:03 AMIfvwm
01/13/2021, 4:11 AMIfvwm
01/13/2021, 4:12 AMIfvwm
01/13/2021, 4:15 AMval output = client.put<HttpResponse>(addr)
println("this is upload test ${output.headers["Location"]}")
val realUrl = output.headers["Location"]?:""
val result = client.put<OutputStream>(realUrl)
result.write("abc".toByteArray())
result.flush()
Ifvwm
01/13/2021, 4:16 AMgildor
01/13/2021, 4:16 AMgildor
01/13/2021, 4:16 AMgildor
01/13/2021, 4:17 AMgildor
01/13/2021, 4:17 AMIfvwm
01/13/2021, 4:17 AMgildor
01/13/2021, 4:17 AMgildor
01/13/2021, 4:17 AMgildor
01/13/2021, 4:18 AMIfvwm
01/13/2021, 4:19 AMval output = client.put<HttpResponse>(addr)
println("this is upload test ${output.headers["Location"]}")
val realUrl = output.headers["Location"]?:""
val result = client.put<HttpResponse>(realUrl)
val r1 = result.receive<OutputStream>()
r1.write("abc".toByteArray())
r1.flush()
gildor
01/13/2021, 4:19 AMgildor
01/13/2021, 4:20 AMgildor
01/13/2021, 4:21 AMgildor
01/13/2021, 4:21 AMIfvwm
01/13/2021, 4:21 AMIfvwm
01/13/2021, 4:47 AMgildor
01/13/2021, 5:11 AMIfvwm
01/13/2021, 5:54 AMclient.put<ByteArray>(realUrl){
body = "aha".toByteArray()
}
Ifvwm
01/13/2021, 5:57 AMIfvwm
01/13/2021, 5:59 AMgildor
01/13/2021, 6:37 AMgildor
01/13/2021, 6:38 AMgildor
01/13/2021, 6:40 AMIfvwm
01/13/2021, 7:08 AM