[-] Remove RequestConfiguration class, use dict instead

This commit is contained in:
Hykilpikonna
2020-11-22 15:22:04 -05:00
parent 6105e39821
commit 7554458ed5
4 changed files with 10 additions and 22 deletions
+6
View File
@@ -1,5 +1,6 @@
import json
import requests
from telegram.ext import CommandHandler
@@ -22,3 +23,8 @@ def createCommand(method):
# Create handler for the wrapper command
return CommandHandler(method.__name__, command, run_async=True)
# Create and execute http request
def create(req):
return requests.request(req['method'], req['url'], headers=req.get('headers', {}), data=req.get('payload', None))