HTTPS request

A

ashish

Hi ,

I want to send HTTPs put request to the server .Can any one help me how
to do that .

I am using this code

import httplib
from group import *

class HTTPS:


def __init__(self,ip,port=443):

self.ip=ip
self.port=port

self.conn = httplib.HTTPSConnection(str(self.ip))

def send_request(self,method,uri,data=None,headers=None):


self.conn.request(method,uri,data,headers)

if __name__=="__main__"

http_obj=HTTPS('10.51.26.203')
headers={"Content-type": "application/auth-policy+xml","Accept":
"text/plain"}
data="some xml doc"
http_obj.send_request('PUT',uri,data,headers=headers)


But it dumps core where ever i run this.Please tell me where i am going
wrong.

Regards
Ashish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top