public async Task ExcluiUnidade(string sigla) { HttpResponseMessage response = await client.DeleteAsync($"cadastro/medidas/unidadesDeMedidas/{sigla}"); IRespostaDeCadastroDeUnidade resposta = null; if (response.IsSuccessStatusCode) { resposta = await response.Content.ReadAsAsync <IRespostaDeCadastroDeUnidade>(); } }
public async Task <IRespostaDeCadastroDeUnidade> AtualizaUnidade(string sigla, ISolicitacaoDeCadastroDeUnidade solicitacao) { HttpResponseMessage response = await client.PutAsJsonAsync($"cadastro/medidas/unidadesDeMedidas/{sigla}", solicitacao); //response.EnsureSuccessStatusCode(); //return response.Headers.Location; IRespostaDeCadastroDeUnidade resposta = null; if (response.IsSuccessStatusCode) { resposta = await response.Content.ReadAsAsync <IRespostaDeCadastroDeUnidade>(); } return(resposta); }