All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.simiacryptus.skyenet.webui.servlet.AppInfoServlet.kt Maven / Gradle / Ivy

There is a newer version: 1.2.21
Show newest version
package com.simiacryptus.skyenet.webui.servlet

import com.simiacryptus.util.JsonUtil
import jakarta.servlet.http.HttpServlet
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse

class AppInfoServlet(val info: (String?) -> T) : HttpServlet() {
    override fun doGet(req: HttpServletRequest, resp: HttpServletResponse) {
        val session = req.getParameter("session")
        resp.contentType = "text/json"
        resp.status = HttpServletResponse.SC_OK
        resp.writer.write(JsonUtil.objectMapper().writeValueAsString(info(session)))
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy