Buscar o sessionId e o cookie de uma conexão
Estou precisando buscar o sessionId e o cookie de uma conexão, estou usando desta forma:
var url = new Uri("https://nutriex.conexos.cloud/api/login");
var client = new RestClient(url);
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Cnx-usnCod", "1");
request.AddHeader("Cnx-filCod", "1");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "Cookie_1=value; sid=1068780f-8e62-40bc-9b69-ecefdba35ec0");
var body = @"{""username"":""TESTES"",""password"":""TESTES123""}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = restClient.Execute(restRequest);
Agora a partir daqui eu preciso buscar o sessionId e o cookie. Como faço isso???
var url = new Uri("https://nutriex.conexos.cloud/api/login");
var client = new RestClient(url);
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Cnx-usnCod", "1");
request.AddHeader("Cnx-filCod", "1");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "Cookie_1=value; sid=1068780f-8e62-40bc-9b69-ecefdba35ec0");
var body = @"{""username"":""TESTES"",""password"":""TESTES123""}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = restClient.Execute(restRequest);
Agora a partir daqui eu preciso buscar o sessionId e o cookie. Como faço isso???
Renato Azevedo
Curtidas 0