From ed53a40448d3c7b7e6bf240ade5c2e2f56d3c461 Mon Sep 17 00:00:00 2001 From: Denis Volkov Date: Thu, 22 Sep 2022 10:15:14 -0700 Subject: [PATCH] reorder the parameters in the http request --- Amen/Controllers/PrayerController.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Amen/Controllers/PrayerController.cs b/Amen/Controllers/PrayerController.cs index afc84b0..43e23ad 100644 --- a/Amen/Controllers/PrayerController.cs +++ b/Amen/Controllers/PrayerController.cs @@ -647,15 +647,17 @@ namespace Amen.Controllers Affiliate affiliate = db.Affiliates.Find(affiliateId); string APIUrl = "https://amendatasync.azurewebsites.net/api/AmenDataSync"; - APIUrl += "?task=" + task + - "&brand=" + affiliate.Name + - "&prayer_request=" + prayer_request + - "&name=" + name + - "&email=" + email + - "&phone=" + phone; + APIUrl += "?task=" + task + + "&brand=" + affiliate.Name + + "&name=" + name + + "&email=" + email + + "&phone=" + phone + + "&prayer_request=" + prayer_request; + //need this for https to work ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; + using (var client = new HttpClient()) { client.BaseAddress = new Uri(APIUrl);