public async Task CriarLancamento(CriarLancamentoModel model) { using (var response = await _httpClient.PostAsJsonAsync($"contacorrente/novo-lancamento", model)) { response.EnsureSuccessStatusCode(); } }
public async Task <IActionResult> CriarLancamento(CriarLancamentoModel model) { if (ModelState.IsValid) { await _serviceApi.CriarLancamento(model); return(RedirectToAction("Index")); } return(View(model)); }