urllib2 - basic authentication and the put and delete methods

deelan ggg at zzz.it
Fri Jul 8 12:40:21 CEST 2005

news.corp.adobe.com wrote:
> But despite much searching, I have yet to discover how to then use PUT and 
> DELETE to copy files / delete files on the server.

i believe you have to use httplib for that:

examples here:

basically you pass auth headers whie
using PUT/DELETE verbs:

## untested! ##

headers = {
   "Authorization": authheader # your base 64 str
conn.request("PUT", "/your/url/here", body, headers)


deelan, #1 fan of adriana lima!

More information about the Python-list mailing list