Answer the question
In order to leave comments, you need to log in
How to check authorization post request through cookies?
xNet library
How to check authorization by post request through cookies ?
For example, if through the page code then
using (var request = new xNet.Net.HttpRequest())
{
request.Cookies = new CookieDictionary();
request.AllowAutoRedirect = false;
request.UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0";
request.AllowAutoRedirect = false;
request.Referer = "https://site.ru/";
string response = request.Post("https://site.ru/", "login=" + login + "&pass=" + password, "application/x-www-form-urlencoded").ToString();
if (response.Contains("Что-то в коде страницы что есть только при удачной авторизации"))
{
MessageBox.Show("Ок");
}
else
{
MessageBox.Show("Не ок");
}
}
Answer the question
In order to leave comments, you need to log in
Guys, it turned out to be done like this
. But something tells me that this is a fierce crutch and you can’t do this. Personally, this will suit me, but I wonder how to do it right?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question