You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

package org.mosad.thecitadelofricks.controller
import org.slf4j.Logger
import org.slf4j.LoggerFactory
class CachetAPIController {
companion object {
private val logger: Logger = LoggerFactory.getLogger(
fun postTotalRequests(totalRequests: Int) {"sending post request ...")
val currentTime = System.currentTimeMillis() / 1000
val data = mapOf(Pair("value", totalRequests.toString()), Pair("timestamp", currentTime.toString()))
val url = URL("")
val connection = url.openConnection() as HttpURLConnection
connection.setRequestProperty("X-Cachet-Token", "h0103Wix5xhhNH5tk5KU")
connection.requestMethod = "POST"
connection.doOutput = true
val writer = OutputStreamWriter(connection.outputStream)

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close