HTTPS request

Discussion in 'Python' started by ashish, Sep 4, 2007.

  1. ashish

    ashish Guest

    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
     
    ashish, Sep 4, 2007
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,600
    John Saunders
    Oct 16, 2003
  2. =?Utf-8?B?cHBhdGVs?=

    Request.ServerVariables ("HTTP_REFERER") using https

    =?Utf-8?B?cHBhdGVs?=, Mar 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,837
    Eric Lawrence [MSFT]
    Mar 3, 2004
  3. =?Utf-8?B?RGVlcw==?=

    Weird problem with HTTPS and Request.Url.AbsoluteUri

    =?Utf-8?B?RGVlcw==?=, Oct 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    5,610
    Bruce Barker
    Oct 21, 2005
  4. iexpl
    Replies:
    2
    Views:
    3,105
    Robert Olofsson
    Jan 14, 2004
  5. Nico Grubert

    How to open https Site and pass request?

    Nico Grubert, May 23, 2006, in forum: Python
    Replies:
    0
    Views:
    408
    Nico Grubert
    May 23, 2006
  6. Axel
    Replies:
    8
    Views:
    2,094
    Adrienne Boswell
    Apr 27, 2009
  7. jotto
    Replies:
    4
    Views:
    708
    jotto
    Oct 2, 2006
  8. Naveen Dhanuka
    Replies:
    1
    Views:
    468
Loading...