def __init__(self, url, handlers=None, headers=None):
        """
        Creates a new HttpTransport

        :Parameters:
          url
            URL of the server endpoint
          handlers
            Optional list of handlers to pass to urllib2.build_opener()
          headers
            Optional list of HTTP headers to set on requests.  Note that Content-Type will always be set
            automatically to "application/json"
        """
        if not headers:
            headers = { }
        headers['Content-Type'] = 'application/json'
        self.url = url
        self.headers = headers
        if handlers:
            self.opener = urllib2.build_opener(*handlers)
        else:
            self.opener = urllib2.build_opener()
def __init__ ( self , url , handlers = None , headers = None ) : if not headers : headers = { } headers [ 'Content-Type' ] = 'application/json' self . url = url self . headers = headers if handlers : self . opener = urllib2 . build_opener ( * handlers ) else : self . opener = urllib2 . build_opener ( )
Creates a new HttpTransport

        :Parameters:
          url
            URL of the server endpoint
          handlers
            Optional list of handlers to pass to urllib2.build_opener()
          headers
            Optional list of HTTP headers to set on requests.  Note that Content-Type will always be set
            automatically to "application/json"