public void call() { string requestString = HttpUtility.UrlPathEncode("idata=" + "C:/Users/DELL/Desktop/PFE/JobPostingTest/JobPostingTest.xml"); //XMLDoc is the XML data string being submitted. string HUD_URL = "https://gateway.monster.com:8443/bgwBroker"; //Just pretend I have a valid url, username and password here. string uName = "xrtpjobsx01"; string pWord = "rtp987654"; HttpWebRequest request = null; WebResponse response = null; request = (HttpWebRequest)WebRequest.Create(HUD_URL); // Create a request using a URL that can receive a post. request.Credentials = new NetworkCredential(uName, pWord); //Our credentials for the website. request.Method = "POST"; // Set the Method property of the request to POST. request.ContentType = "application/x-www-form-urlencoded; charset=ISO-8859-1"; StreamWriter sw = new StreamWriter(request.GetRequestStream()); // Wrap the request stream with a text-based writer sw.WriteLine(requestString); // Write the xml as text into the stream sw.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)