I need to consume a Rest API from an ERP Site, where I will list some items from this site, but I do not find anything useful that can help me to consume
I am using json and http client to perform, but the error in the process recognize the site path
public partial class ProdutoPage : ContentPage
{
ListView lv = new ListView();
public ProdutoPage()
{
InitializeComponent();
iniciar();
}
private async void iniciar()
{
//tinyapp API = new tinyapp();
//var lista = API.ListaCategorias("automacao");
var client = new HttpClient();
client.DefaultRequestHeaders.Add("token", "");
client.BaseAddress = new Uri("site");
var resp = await client.GetAsync("site");
if (resp.IsSuccessStatusCode)
{
var respStr = await resp.Content.ReadAsStringAsync();
var l = JsonConvert.DeserializeObject<List<Pedido>>(respStr);
lv.ItemsSource = l;
}
}
}
}
I need a list of ERP site requests