Stefan Oltmann
01/01/2024, 10:18 PMval client = HttpClient()
val response: HttpResponse = <http://client.post|client.post>("<http://localhost:8080/upload>") {
    contentType(ContentType.Application.OctetStream)
    setBody(bytes)
}fun Application.configureRouting() {
    routing {
        get("/") {
            call.respondText("<http://stefan-oltmann.de|stefan-oltmann.de>")
        }
        post("/upload") {
            val byteArray = call.receiveStream().readBytes()
            println("Received bytes: ${byteArray.size}")
            val saveGame = SaveGameReader.readSaveGame(byteArray)
            val summary = saveGame.createSummary()
            call.respondText(summary.toString())
        }
    }
}2024-01-01 23:15:39.439 [eventLoopGroupProxy-4-1] TRACE io.ktor.routing.Routing - Trace for [upload]
/, segment:0 -> SUCCESS @ /
  /, segment:0 -> SUCCESS @ /
    /(method:GET), segment:0 -> FAILURE "Selector didn't match" @ /(method:GET)
  /upload, segment:1 -> SUCCESS @ /upload
    /upload/(method:POST), segment:1 -> FAILURE "Selector didn't match" @ /upload/(method:POST)
  /health, segment:0 -> FAILURE "Selector didn't match" @ /health
Matched routes:
  No results
Route resolve result:
  FAILURE "No matched subtrees found" @ /hallvard
01/02/2024, 7:42 AMPOSTGETStefan Oltmann
01/02/2024, 9:03 AMpost("/upload")hallvard
01/02/2024, 10:09 AM/upload/(method:POST), segment:1 -> FAILURE "Selector didn't match" @ /upload/(method:POST)Aleksei Tirman [JB]
01/02/2024, 10:40 AMStefan Oltmann
01/02/2024, 11:54 AMhallvard
01/02/2024, 11:57 AMAccept: **/**Stefan Oltmann
01/02/2024, 11:59 AMhallvard
01/02/2024, 12:00 PM