private async void button1_ClickAsync(object sender, EventArgs e) { // Initialize(); APIAppUserTokenResponseModels.ValidateToken resp = await uow.TokenService.ValidateToken(); MessageBox.Show(resp.Response.StatusTitle); }
public async Task <APIAppUserTokenResponseModels.ValidateToken> ValidateToken() { APIAppUserTokenRequestModels.ValidateToken model = new APIAppUserTokenRequestModels.ValidateToken(); model.Token = Guid.Parse(hostconfig.Token); string strResult = await HttpPost("api/APPTokens/ValidateToken", JsonConvert.SerializeObject(model)); APIAppUserTokenResponseModels.ValidateToken result = (APIAppUserTokenResponseModels.ValidateToken)JsonConvert.DeserializeObject(strResult, typeof(APIAppUserTokenResponseModels.ValidateToken)); return(result); }