Untitled

mail@pastecode.io avatar
unknown
python
3 years ago
417 B
4
Indexable
Never
def http(self, url, data = {}, post = False):
        try:
            if post:
                r = requests.post(url, data = data, headers = self.headers, timeout = 20)
            else:
                r = requests.get(url, params = data, headers = self.headers, timeout = 20)
        except:
            print('[-] Something went wrong. Please check your internet connection')
        finally:
            return r