0

how to create desktop applications in c# using http requests and http response with iis

3
Contributors
4
Replies
6
Views
9 Years
Discussion Span
Last Post by sknake
0

C# can make http/https requests - have a bit of a read and searching on google, with such a generic question no one can give you specifics.

0

my question is a bit abstract but I need any links or reference so that I can do r&d accordingly

0

Here is a sample snippet of the code I use to post bug reports from my applications:

public static void PostRpt(string msg)
    {
      WebRequest post = WebRequest.Create(@"http://www.apexsoftware.com/");
      post.Method = "POST";
      post.ContentType = "application/x-www-form-urlencoded";
      using (Stream dataStream = post.GetRequestStream())
      {
        System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
        Byte[] bytes = encoding.GetBytes(msg);
        dataStream.Write(bytes, 0, bytes.Length);
        dataStream.Close();
        dataStream.Dispose();
        WebResponse response = post.GetResponse();
        response.Close();
      }
    }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.