K0nkere / DL_Dice-detection-project

DnD dice detection with CNN and transfer learning / Project for ML Bookcamp
0 stars 0 forks source link

How to: requests library #17

Open K0nkere opened 1 year ago

K0nkere commented 1 year ago

Send POST consist of value and file request to webhook with authorization

url = "<...>"
auth = "<...>"

data = {"AgendaItemId": <str???>}
files = {"file": open(<file_path>, 'rb')}

headers = {"Authorization": auth}

response = requests.post(url,
                            headers=headers,
                            files=files,
                            data=data
                            ).json()
files['file'].close()