Реализован вход в систему в IntersvyazClient.

This commit is contained in:
mikhail "synzr" 2025-11-19 00:16:11 +05:00
parent cb36edfd2e
commit 6ee66e4020
7 changed files with 158 additions and 8 deletions

View file

@ -0,0 +1,20 @@
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Net.Http;
namespace Intersvyaz.Net
{
public class JsonContent : StringContent
{
public JsonContent(object value) : base(Serialize(value), Encoding.UTF8, "application/json") { }
private static string Serialize(object value)
{
return JsonConvert.SerializeObject(value, Formatting.None, new JsonSerializerSettings()
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
});
}
}
}