Просмотр исходного кода

1. Fix Http Post Body 格式問題

Jessica Tseng 2 лет назад
Родитель
Сommit
1d33e44a2d

+ 1 - 1
EVCB_OCPP.WSServer/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("1.0.5.0")]
 [assembly: AssemblyFileVersion("1.0.5.0")]
 
-[assembly: AssemblyInformationalVersion("6961d91")]
+[assembly: AssemblyInformationalVersion("8683d1c")]

+ 9 - 8
EVCB_OCPP.WSServer/Service/OuterBusinessService.cs

@@ -147,13 +147,19 @@ namespace EVCB_OCPP.WSServer.Service
             {
                 if (signMaterial.CallsThirdParty)
                 {
+
+                    logger.Info(" NotifyFaultStatus======================================>");
+                    logger.Info(JsonConvert.SerializeObject(details));
+
+
                     var response = await httpClient.Post(signMaterial.APIUrl + "connectorfault", new Dictionary<string, string>()
                             {
                                 { "PartnerId",signMaterial.Id}
 
-                            }, JsonConvert.SerializeObject(details, GlobalConfig.JSONSERIALIZER_FORMAT), signMaterial.SaltKey).ConfigureAwait(false);
-
+                            }, details, signMaterial.SaltKey).ConfigureAwait(false);
 
+                  
+                    logger.Info(JsonConvert.SerializeObject(response));
                 }
 
 
@@ -180,12 +186,7 @@ namespace EVCB_OCPP.WSServer.Service
                             {
                                 { "PartnerId",signMaterial.Id}
 
-                            }, JsonConvert.SerializeObject(details, new JsonSerializerSettings()
-                            {
-                                DateTimeZoneHandling = DateTimeZoneHandling.Utc,
-                                NullValueHandling = NullValueHandling.Ignore,
-                                Formatting = Formatting.None
-                            }), signMaterial.SaltKey).ConfigureAwait(false);
+                            }, details, signMaterial.SaltKey).ConfigureAwait(false);
 
 
                 }

BIN
SuperWebSocket/bin/Debug/SuperWebSocket.dll


BIN
SuperWebSocket/bin/Debug/SuperWebSocket.pdb