Created
April 13, 2016 02:16
-
-
Save khapota/0ff0c712c5f21a53b890b03bd92a366d to your computer and use it in GitHub Desktop.
upload files python request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
files = {"upload_file": open('path/to/file.txt', 'rb')} | |
data = {"content": "test upload"} | |
requests.post(url, files=files, data=data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment