Compare commits
No commits in common. "a6e2bef231c27bba2ad6f658abb4722be699ed48" and "907089abe14bdab14e9b608065ae43e6656ef757" have entirely different histories.
a6e2bef231
...
907089abe1
@ -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.1.11</Version>
|
<Version>1.1.10</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -15,22 +15,18 @@ public class OpenShockHttp : HttpShocker
|
|||||||
{
|
{
|
||||||
Headers =
|
Headers =
|
||||||
{
|
{
|
||||||
UserAgent = { new ProductInfoHeaderValue("CShocker", "1") },
|
UserAgent = { new ProductInfoHeaderValue("OpenCS2hock", "1") },
|
||||||
Accept = { new MediaTypeWithQualityHeaderValue("application/json") }
|
Accept = { new MediaTypeWithQualityHeaderValue("application/json") }
|
||||||
},
|
},
|
||||||
Content = new StringContent("{ shocks: ["+
|
Content = new StringContent(@"[ { "+
|
||||||
"{ "+
|
$"\"id\": \"{shockerId}\"," +
|
||||||
$"\"id\": \"{shockerId}\"," +
|
$"\"type\": {ControlActionToByte(action)},"+
|
||||||
$"\"type\": {ControlActionToByte(action)},"+
|
$"\"intensity\": {intensity},"+
|
||||||
$"\"intensity\": {intensity},"+
|
$"\"duration\": {duration}"+
|
||||||
$"\"duration\": {duration}"+
|
"}]", Encoding.UTF8, new MediaTypeHeaderValue("application/json"))
|
||||||
"}" +
|
|
||||||
"]," +
|
|
||||||
"customName: CShocker" +
|
|
||||||
"}", Encoding.UTF8, new MediaTypeHeaderValue("application/json"))
|
|
||||||
};
|
};
|
||||||
request.Headers.Add("OpenShockToken", ApiKey);
|
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}");
|
this.Logger?.Log(LogLevel.Debug, $"{request.RequestUri} response: {response.StatusCode}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user