reorder the parameters in the http request

This commit is contained in:
Denis Volkov 2022-09-22 10:15:14 -07:00
parent 372d7e34b2
commit ed53a40448

View File

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