forum

Home / DeveloperSection / Forums / do httpwebrequest but without waiting for response

do httpwebrequest but without waiting for response

Anonymous User 2556 29-Aug-2014

I do not want to wait for response from server because i do not care about response for these httpwebrequest.

HttpWebRequest PostRequest = (HttpWebRequest)WebRequest.Create(PostUrl);
        PostRequest.ContentType = PostContentType;
        PostRequest.Method = "POST";
        byte[] bytes = Encoding.ASCII.GetBytes(DataUrl);           
        try
        {
            PostRequest.ContentLength = bytes.Length;
            using (Stream webpageStream = PostRequest.GetRequestStream())
            {
                webpageStream.Write(bytes, 0, bytes.Length);
            }
        }
        catch (Exception ex)
        {
            //
        }

Thanks


Updated on 01-Sep-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By