deleteWebhook method

Future<bool> deleteWebhook({
  1. bool? dropPendingUpdates,
})

Use this method to remove webhook integration if you decide to switch back to getUpdates

Returns True on success. Requires no parameters.

https://core.telegram.org/bots/api#deletewebhook

Implementation

Future<bool> deleteWebhook({bool? dropPendingUpdates}) async {
  var requestUrl = _apiUri('deleteWebhook');
  var body = <String, dynamic>{'drop_pending_updates': dropPendingUpdates};
  return await HttpClient.httpPost(requestUrl, body: body);
}