File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -316,9 +316,14 @@ public async Task<HttpResponse> GetUserOnlineStatusAsync(List<string> registrati
316316 throw new ArgumentException ( nameof ( registrationIdList ) ) ;
317317
318318 var url = BASE_URL + "/v3/devices/status/" ;
319+ JObject jObj = new JObject
320+ {
321+ [ "registration_ids" ] = new JArray ( registrationIdList )
322+
323+ } ;
324+
325+ var requestContent = new StringContent ( jObj . ToString ( ) , Encoding . UTF8 ) ;
319326
320- var requestJson = JsonConvert . SerializeObject ( registrationIdList ) ;
321- HttpContent requestContent = new StringContent ( requestJson , Encoding . UTF8 ) ;
322327 HttpResponseMessage msg = await JPushClient . HttpClient . PostAsync ( url , requestContent ) . ConfigureAwait ( false ) ;
323328 string responseContent = await msg . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
324329 return new HttpResponse ( msg . StatusCode , msg . Headers , responseContent ) ;
Original file line number Diff line number Diff line change 1212 <Copyright >MIT</Copyright >
1313 <PackageLicenseUrl ></PackageLicenseUrl >
1414 <PackageProjectUrl >https://github.com/jpush/jpush-api-csharp-client</PackageProjectUrl >
15- <Version >1.2.1 </Version >
15+ <Version >1.2.2 </Version >
1616 </PropertyGroup >
1717
1818 <PropertyGroup Condition =" '$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.1|AnyCPU'" >
You can’t perform that action at this time.
0 commit comments