Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- url = "http://example.com/file.csv"
- id = "user-id"
- password = "password"
- headers = {'content-type': 'application/x-www-form-urlencoded'}
- with open(file_path, 'rb') as f:
- response = requests.post(url=url, files={'file':f}, auth=HTTPBasicAuth(username=id, password=password),headers=headers)
- curl -u user-id:password -T file/path/on/local/machine/file.csv "http://example.com/file.csv"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement