var json = JsonConvert.SerializeObject(data); var stringContent = new StringContent(json, Encoding.UTF8, "application/json"); var httpContent = new MultipartFormDataContent(); httpContent.Add(stringContent, "params"); using var httpClientHandler = new HttpClientHandler(); httpClientHandler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; var httpClient = new HttpClient(httpClientHandler); var response = await httpClient.PostAsync(url, httpContent); response.EnsureSuccessStatusCode(); if…