PUT request in pypump
Closed this issue · 0 comments
samuel-soubeyran commented
why in the file : https://github.com/xray7224/PyPump/blob/master/pypump/pypump.py, line 225 function request, do we test every HTTP verb exept PUT?
The API doesn't mention the PUT verb, but the website uses it. My use case is to specify the user avatar which I reverse engineered (from the website pump) to be something along the line :
res, content =pump.request(me.links['self'],method="PUT",headers={'Content-type': 'application/json', 'Accept': 'text/plain'},data={
'id': me.id,
'image':{
'url':avatar_url,
'height':settings.AVATAR_DEFAULT_SIZE,
'width':settings.AVATAR_DEFAULT_SIZE
},
'pump_io':{
'fullImage':{
'url':avatar_url,
'height':settings.AVATAR_DEFAULT_SIZE,
'width':settings.AVATAR_DEFAULT_SIZE
}
}
})