Question: PreconfirmCallback cant perform http request?
glararan opened this issue · comments
glararan commented
Describe the bug
I would like to make http delete request withing preconfirm callback. However my call never make it to server and value is returned.
To Reproduce
SweetAlertResult result = await SweetAlert.FireAsync(new SweetAlertOptions
{
Icon = SweetAlertIcon.Warning,
ShowCancelButton = true,
PreConfirm = new PreConfirmCallback(async() =>
{
try
{
await Http.DeleteAsync($"api/Product/{item.Id}");
return "1";
}
catch
{
return "0";
}
})
});
Expected behavior
Wait till http delete make request then return "1".
glararan commented
Wrong request url. What a fail.