Compare commits
2 Commits
f2207e8667
...
47f25c5064
Author | SHA1 | Date |
---|---|---|
Hannes Braun | 47f25c5064 | |
Hannes Braun | 951a659be1 |
|
@ -15,11 +15,11 @@ repositories {
|
|||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.4'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.23'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
|
||||
implementation 'org.jsoup:jsoup:1.15.3'
|
||||
implementation 'com.google.code.gson:gson:2.10'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0'
|
||||
implementation 'org.jsoup:jsoup:1.17.2'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.io.BufferedReader
|
|||
import java.io.IOException
|
||||
import java.io.InputStreamReader
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.net.URI
|
||||
|
||||
class CachetAPIController {
|
||||
|
||||
|
@ -41,7 +41,7 @@ class CachetAPIController {
|
|||
|
||||
fun postTotalRequests() {
|
||||
try {
|
||||
val url = URL("${StartupController.cachetBaseURL}/api/v1/metrics/1/points")
|
||||
val url = URI("${StartupController.cachetBaseURL}/api/v1/metrics/1/points").toURL()
|
||||
val jsonInputString = "{\"value\": ${totalRequests -oldTotalRequests}, \"timestamp\": \"${(System.currentTimeMillis() / 1000)}\"}"
|
||||
oldTotalRequests = totalRequests
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.mosad.thecitadelofricks.Status
|
|||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.net.URI
|
||||
import java.time.LocalDateTime
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
|
@ -90,8 +90,8 @@ class StatusController {
|
|||
var swfrCode = 999
|
||||
|
||||
try {
|
||||
val hsoURL = URL("https://www.hs-offenburg.de/")
|
||||
val swfrURL = URL("https://www.swfr.de/")
|
||||
val hsoURL = URI("https://www.hs-offenburg.de/").toURL()
|
||||
val swfrURL = URI("https://www.swfr.de/").toURL()
|
||||
|
||||
var connection = hsoURL.openConnection() as HttpURLConnection
|
||||
connection.requestMethod = "HEAD"
|
||||
|
|
Loading…
Reference in New Issue