locked
Making XML requests RRS feed

  • Question

  • Hi

    How can I make xml requests in Access and get the response as well please? I am looking for the equivalent of the below c# code.

    Many thanks

    Regards

                    // Create the request
                    string xmlRequest = "REPLACE THIS FOR THE XML REQUEST";
    
                    // Send the request
                    HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("http://api.uclassify.com");
                    webRequest.Method = "Post";
                    webRequest.ContentType = "text/XML";
                    StreamWriter writer = new StreamWriter(webRequest.GetRequestStream());
                    writer.Write(xmlRequest);
                    writer.Close();
    
                    // Read the response
                    HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
                    StreamReader reader = new StreamReader(webResponse.GetResponseStream());
                    string xmlResponse = reader.ReadToEnd();
                    reader.Close();
    
                    Console.WriteLine(xmlResponse);
    


    • Edited by Y a h y a Monday, October 29, 2012 2:16 PM
    Monday, October 29, 2012 2:15 PM

Answers