測試requests - jenhaoyang/backend_blog GitHub Wiki

# 要上傳的檔案
my_files = {'my_filename': open('my_file.docx', 'rb')}

# 將檔案加入 POST 請求中
r = requests.post('http://httpbin.org/post', files = my_files)

參考:
https://blog.gtwang.org/programming/python-requests-module-tutorial/