Jeremy Stein - Brain
« Recursive decompile | This Assembler cannot retrieve a document specification using this type » |
C# Submit XML
Here is the Main method for a C# program that will send the specified XML file to the given URL:
static void Main(string[] args) { byte[] fileContents = File.ReadAllBytes(args[0]); WebRequest request = WebRequest.Create(args[1]); request.Method = "POST"; request.ContentType = "text/xml"; request.ContentLength = fileContents.Length; Stream postStream = request.GetRequestStream(); postStream.Write(fileContents, 0, fileContents.Length); postStream.Close(); Console.WriteLine(new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd()); }
No Comments
Be the first to comment!
« Recursive decompile | This Assembler cannot retrieve a document specification using this type » |
Leave a Reply