Apr-12-2019, 06:29 PM
Hello. I am very new to python and would appreciate some help with the following. I have this curl command which works fine:
curl --cacert C:\cacert.pem -u user:key -F "[email protected]" https://serverurl/users/pictures
I converted the curl command to:
curl --cacert C:\cacert.pem -u user:key -F "[email protected]" https://serverurl/users/pictures
I converted the curl command to:
picture = { 'data' : ('picture',open('picture.jpg','rb')) } req = requests.post('https://serverurl/users/pictures',files=picture, auth=('user','key'))I get 200 response but the picture does not get uploaded to the server. Not sure what I am missing. Thank you!