1
I have the following code:
string json = new JavaScriptSerializer().Serialize(new
{
email = textBoxLogin.Text,
password = textBoxSenha.Text
});
using (var client = new HttpClient())
{
var response = client.PostAsync(
"https://apidomeuservidor.site/estabelecimento/auth/entrar",
new StringContent(json, Encoding.UTF8, "application/json"));
var resposta = response.Result.Content.ReadAsStringAsync();
MessageBox.Show(resposta.ToString());
}
The answer to this call is thus:
"data": {
"access_token": "TOKEN QUE QUERO yvOujoe7bOh5eypOZiPQ9dXrxR-XbE",
"token_type": "bearer",
"expires_in": 2592000
}
How do I manipulate this answer?
The API response is being 200, only I can’t manipulate the answer
I can get the Status code and stuff, but I really can’t get the answer
Thanks in advance
What do you mean by manipulating? You want to "transform" your request response into an object, to use it?
– tvdias
This to use in code - being Object, list, array
– Ewerton Dutra