Exemple #1
0
 public override async Task <bool> ExecuteAsync()
 {
     CheckExecution();
     Result = new RestResult(await Webhook.RestProvider.DELETE(Webhook.GetWebhookUrl(), RestSettings));
     Webhook.Dispose();
     return(Result.LastResponse.HasValue && BaseRestProvider.DELETE_ALLOWED_STATUSES.Contains(Result.LastResponse.Value.StatusCode));
 }
Exemple #2
0
 public override async Task <bool> ExecuteAsync()
 {
     CheckExecution();
     Result = new RestResult(await Webhook.RestProvider.POST(Webhook.GetWebhookUrl(), Message.Serialize(), RestSettings));
     SettingRateLimit();
     return(Result.LastResponse.HasValue && BaseRestProvider.POST_ALLOWED_STATUSES.Contains(Result.LastResponse.Value.StatusCode));
 }