Files
Blazy/core/requester.py

18 lines
407 B
Python
Raw Normal View History

2022-11-28 23:24:13 +05:30
import requests
import warnings
import core.config as mem
warnings.filterwarnings('ignore') # Disable SSL related warnings
def requester(url, payload={}):
"""
central function for making http requests
returns str on error otherwise response object of requests library
"""
return requests.post(url,
data=payload,
verify=False,
timeout=mem.var['timeout'],
)