Fi xjson message string
This commit is contained in:
parent
4b19a9f434
commit
ed4eb644a0
@ -7,7 +7,7 @@
|
||||
<Authors>Glax</Authors>
|
||||
<RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>1.3.7</Version>
|
||||
<Version>1.3.8</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -63,15 +63,16 @@ public class OpenShockHttp : HttpShocker
|
||||
UserAgent = { new ProductInfoHeaderValue("CShocker", "1") },
|
||||
Accept = { new MediaTypeWithQualityHeaderValue("application/json") }
|
||||
},
|
||||
Content = new StringContent("{ shocks: ["+
|
||||
"{ "+
|
||||
$"\"id\": \"{shockerId}\"," +
|
||||
$"\"type\": {ControlActionToByte(action)},"+
|
||||
$"\"intensity\": {intensity},"+
|
||||
$"\"duration\": {duration}"+
|
||||
"}" +
|
||||
Content = new StringContent("{" +
|
||||
"\"shocks\": ["+
|
||||
"{"+
|
||||
$"\"id\": \"{shockerId}\"," +
|
||||
$"\"type\": {ControlActionToByte(action)},"+
|
||||
$"\"intensity\": {intensity},"+
|
||||
$"\"duration\": {duration}"+
|
||||
"}" +
|
||||
"]," +
|
||||
"customName: CShocker" +
|
||||
"\"customName\": CShocker" +
|
||||
"}", Encoding.UTF8, new MediaTypeHeaderValue("application/json"))
|
||||
};
|
||||
request.Headers.Add("OpenShockToken", ApiKey);
|
||||
|
Loading…
Reference in New Issue
Block a user