OpenSource » SampleCode » NexPortWebApiClient
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Fix error when running new client SDK

Changeset cd31c76245d2

Parent 6861117da182

by Profile picture of Thai NguyenThai Nguyen

Changes to one file · Browse files at cd31c76245d2 Showing diff from parent 6861117da182 Diff from another changeset...

 
129
130
131
132
133
134
135
136
137
138
 
383
384
385
386
 
387
388
389
390
391
 
392
393
394
 
395
396
397
 
129
130
131
 
 
 
 
132
133
134
 
379
380
381
 
382
383
384
385
386
 
387
388
389
 
390
391
392
393
@@ -129,10 +129,6 @@
  }   }   - public string RootElement { get; set; } - public string Namespace { get; set; } - public string DateFormat { get; set; } -   public string ContentType   {   get => _contentType; @@ -383,15 +379,15 @@
  client.ClearHandlers();   if (req.JsonSerializer is IDeserializer existingDeserializer)   { - client.AddHandler(existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json", "text/plain"); + client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");   }   else   {   var codec = new CustomJsonCodec(configuration); - client.AddHandler(codec, "application/json", "text/json", "text/x-json", "text/javascript", "*+json", "text/plain"); + client.AddHandler(() => codec, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");   }   - client.AddHandler(new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*"); + client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");     client.Timeout = configuration.Timeout;