Changing get method to get XML to Post - C#
0
I am using GET to authenticate and generate XML but I want to change this to POST method instead. Please see my code below: string url = "https://www.example.com/?username=" + username + "&password=" + password; XmlDocument xmldoc = new XmlDocument(); ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(customXertificateValidation); ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; xmldoc.Load(url); XmlNode name = xmldoc.SelectSingleNode("/Node/Name"); This above code is working fine. I just need to change this get request for authentication to post. I will really appreciate your help.
c# post xmlhttprequest