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);