Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > HTTPS request

Reply
Thread Tools

HTTPS request

 
 
ashish
Guest
Posts: n/a
 
      09-04-2007
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=Non e):


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=heade rs)


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

Regards
Ashish

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
server side redirect https => https NOT working Axel ASP General 8 04-27-2009 02:02 AM
https authentication & storing https page in string Naveen Dhanuka Ruby 1 09-19-2007 02:05 PM
open-uri and HTTPS, or net/https with a redirect jotto Ruby 4 10-02-2006 07:26 AM
Request.ServerVariables ("HTTP_REFERER") using https =?Utf-8?B?cHBhdGVs?= ASP .Net 1 03-03-2004 02:25 AM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57