[+] Create RequestConfiguration.create

This commit is contained in:
Hykilpikonna
2020-11-22 12:45:34 -05:00
parent 34ec2732e8
commit 5c89b401d4
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -9,3 +9,4 @@ pytz==2020.4
six==1.15.0
tornado==6.1
tzlocal==2.1
requests==2.25.0
+8 -1
View File
@@ -1,7 +1,14 @@
import requests
class RequestConfiguration:
headers = []
headers = {}
payload = {}
def __init__(self, url, method="GET"):
self.url = url
self.method = method
# Create and execute http request
def create(self):
return requests.request(self.method, self.url, headers=self.headers, data=self.payload)