Piotr KrzemiĆski
08/09/2021, 12:04 PMGerard de Leeuw
08/09/2021, 2:20 PMCIO is a fully asynchronous coroutine-based engine that can be used for both JVM and Android platforms. It supports only HTTP/1.x for now. To use it, follow the steps below:
Aleksei Tirman [JB]
08/09/2021, 3:50 PMval file = File("files", "output.jpg")
embeddedServer(CIO, port = 7070) {
routing {
patch("/") {
call.receiveStream().copyTo(file.outputStream())
}
}
}.start(wait = true)
Please share a code snippet to reproduce your problem.Piotr KrzemiĆski
08/09/2021, 3:53 PMPiotr KrzemiĆski
08/10/2021, 7:37 AMOrigin
request header, and the other one doesn't. I got HTTP 403 and HTTP 200 respectively. This behavior would be good to explain on its own, and I'm still working to make my specific PATCH work. Removing Origin
header from PATCH request doesn't work, the browser seems to add it automatically.Piotr KrzemiĆski
08/10/2021, 7:37 AMPiotr KrzemiĆski
08/10/2021, 8:12 AMPiotr KrzemiĆski
08/10/2021, 9:32 AMAleksei Tirman [JB]
08/10/2021, 10:02 AMmethod(HttpMethod.Patch)
Piotr KrzemiĆski
08/10/2021, 10:20 AMPiotr KrzemiĆski
08/10/2021, 10:25 AMAleksei Tirman [JB]
08/10/2021, 10:58 AMsendPipeline.intercept(ApplicationSendPipeline.Before) { x ->
if (x is HttpStatusCode && x == HttpStatusCode.Forbidden) {
throw RuntimeException("Show stacktrace")
}
}
Piotr KrzemiĆski
08/10/2021, 11:35 AMPiotr KrzemiĆski
08/10/2021, 12:23 PM