StreamReader myStreamReader = new StreamReader(responseStream, Encoding. Stream responseStream = myHttpWebResponse.GetResponseStream() HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse() RequestStream.Write(data, 0, data.Length) ![]() Stream requestStream = myHttpWebRequest.GetRequestStream() MyHttpWebRequest.ContentLength = data.Length MyHttpWebRequest.ContentType = "application/x-www-form-urlencoded" MyHttpWebRequest.CookieContainer = new CookieContainer() Are you searching for Motorola Solutions Login login or sign-in webpage Here we listed some of the best matches. HttpWebRequest myHttpWebRequest = (HttpWebRequest)HttpWebRequest.Create(requestUrl) īyte data = (postData) ![]() ![]() ![]() Public void postToServer(string postData, string requestUrl) String postData = "username=" + userName + "&password=" + passWord īotLogin.postToServer (postData ,requestUrl) My main code: private void button1_Click(object sender, EventArgs e) I'm trying to login to a website, using a c# post request.ĭoes this code save the cookie actually to the CookieContainer and would it let me use this cookie in other requests also? How would I for example post a get request now with the cookie I saved from the login?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |