Fix wrong HttpMethod

This commit is contained in:
glax 2024-01-19 02:09:33 +01:00
parent aefe3ab30b
commit 0a9ff84a4e
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
<Authors>Glax</Authors> <Authors>Glax</Authors>
<RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl> <RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<Version>1.2.2</Version> <Version>1.2.3</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -12,7 +12,7 @@ public class OpenShockHttp : HttpShocker
public List<string> GetShockers() public List<string> GetShockers()
{ {
HttpRequestMessage requestDevices = new (HttpMethod.Post, $"{Endpoint}/2/devices") HttpRequestMessage requestDevices = new (HttpMethod.Get, $"{Endpoint}/2/devices")
{ {
Headers = Headers =
{ {
@ -34,7 +34,7 @@ public class OpenShockHttp : HttpShocker
List<string> shockerIds = new(); List<string> shockerIds = new();
foreach (string deviceId in deviceIds) 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 = Headers =
{ {