Compare commits
2 Commits
907089abe1
...
a6e2bef231
Author | SHA1 | Date | |
---|---|---|---|
a6e2bef231 | |||
174cea5724 |
@ -7,7 +7,7 @@
|
||||
<Authors>Glax</Authors>
|
||||
<RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>1.1.10</Version>
|
||||
<Version>1.1.11</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -15,18 +15,22 @@ public class OpenShockHttp : HttpShocker
|
||||
{
|
||||
Headers =
|
||||
{
|
||||
UserAgent = { new ProductInfoHeaderValue("OpenCS2hock", "1") },
|
||||
UserAgent = { new ProductInfoHeaderValue("CShocker", "1") },
|
||||
Accept = { new MediaTypeWithQualityHeaderValue("application/json") }
|
||||
},
|
||||
Content = new StringContent(@"[ { "+
|
||||
Content = new StringContent("{ shocks: ["+
|
||||
"{ "+
|
||||
$"\"id\": \"{shockerId}\"," +
|
||||
$"\"type\": {ControlActionToByte(action)},"+
|
||||
$"\"intensity\": {intensity},"+
|
||||
$"\"duration\": {duration}"+
|
||||
"}]", Encoding.UTF8, new MediaTypeHeaderValue("application/json"))
|
||||
"}" +
|
||||
"]," +
|
||||
"customName: CShocker" +
|
||||
"}", Encoding.UTF8, new MediaTypeHeaderValue("application/json"))
|
||||
};
|
||||
request.Headers.Add("OpenShockToken", ApiKey);
|
||||
HttpResponseMessage response = (HttpClient.Send(request));
|
||||
HttpResponseMessage response = HttpClient.Send(request);
|
||||
this.Logger?.Log(LogLevel.Debug, $"{request.RequestUri} response: {response.StatusCode}");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user