| 85 | |
| 86 | |
| 87 | class RequestThread(threading.Thread): |
| 88 | def __init__(self, url, headers, data): |
| 89 | threading.Thread.__init__(self) |
| 90 | self.url = url |
| 91 | self.headers = headers |
| 92 | self.data = data |
| 93 | |
| 94 | def run(self): |
| 95 | response = requests.post(self.url, headers=self.headers, data=json.dumps(self.data)) |
| 96 | if response.status_code == 200: |
| 97 | print(response.json()) |
| 98 | else: |
| 99 | print("Error:", response.status_code, response.text) |
| 100 | |
| 101 | |
| 102 | def image_to_base64(image): |
no outgoing calls
no test coverage detected