From 0a9ff84a4e564035f478ba92f0162f90534336fa Mon Sep 17 00:00:00 2001 From: glax Date: Fri, 19 Jan 2024 02:09:33 +0100 Subject: [PATCH] Fix wrong HttpMethod --- CShocker/CShocker.csproj | 2 +- CShocker/Shockers/APIS/OpenShockHttp.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CShocker/CShocker.csproj b/CShocker/CShocker.csproj index 15e112e..8ab0a35 100644 --- a/CShocker/CShocker.csproj +++ b/CShocker/CShocker.csproj @@ -7,7 +7,7 @@ Glax https://github.com/C9Glax/CShocker git - 1.2.2 + 1.2.3 diff --git a/CShocker/Shockers/APIS/OpenShockHttp.cs b/CShocker/Shockers/APIS/OpenShockHttp.cs index f798bfe..e9ae6f6 100644 --- a/CShocker/Shockers/APIS/OpenShockHttp.cs +++ b/CShocker/Shockers/APIS/OpenShockHttp.cs @@ -12,7 +12,7 @@ public class OpenShockHttp : HttpShocker public List GetShockers() { - HttpRequestMessage requestDevices = new (HttpMethod.Post, $"{Endpoint}/2/devices") + HttpRequestMessage requestDevices = new (HttpMethod.Get, $"{Endpoint}/2/devices") { Headers = { @@ -34,7 +34,7 @@ public class OpenShockHttp : HttpShocker List shockerIds = new(); foreach (string deviceId in deviceIds) { - HttpRequestMessage requestShockers = new (HttpMethod.Post, $"{Endpoint}/2/devices/{deviceId}/shockers") + HttpRequestMessage requestShockers = new (HttpMethod.Get, $"{Endpoint}/2/devices/{deviceId}/shockers") { Headers = {