Skip to content

Commit 8edae46

Browse files
committed
Get session via PATCH instead of GET
1 parent f584b23 commit 8edae46

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/kotlin/dev/arbjerg/lavalink/internal/LavalinkRestClient.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ class LavalinkRestClient(val node: LavalinkNode) {
7979
fun getSession(): Mono<Session> {
8080
return newRequest {
8181
path("/v4/sessions/${node.sessionId}")
82+
// Using patch with an empty object is a dirty hack because GET is not supported for this resource
83+
// 7 years younger me should have known better ~Freya
84+
patch("{}".toRequestBody("application/json".toMediaType()))
8285
}.toMono()
8386
}
8487

0 commit comments

Comments
 (0)