コード例 #1
0
ファイル: urlrequest.py プロジェクト: xiaohanc/rbintegrations
    def __init__(self, url, body='', headers=None, method='GET'):
        """Initialize the URLRequest.

        Args:
            url (unicode):
                The URL to make the request against.

            body (unicode or bytes):
                The content of the request.

            headers (dict, optional):
                Additional headers to attach to the request.

            method (unicode, optional):
                The request method. If not provided, it defaults to a ``GET``
                request.
        """
        BaseURLRequest.__init__(self, url, body, headers or {})
        self.method = method
コード例 #2
0
ファイル: service.py プロジェクト: xiaogao6681/reviewboard
    def __init__(self, url, body='', headers=None, method='GET'):
        """Initialize the URLRequest.

        Args:
            url (unicode):
                The URL to make the request against.

            body (unicode or bytes):
                The content of the request.

            headers (dict, optional):
                Additional headers to attach to the request.

            method (unicode, optional):
                The request method. If not provided, it defaults to a ``GET``
                request.
        """
        # Request is an old-style class and therefore we cannot use super().
        BaseURLRequest.__init__(self, url, body, headers or {})
        self.method = method
コード例 #3
0
ファイル: service.py プロジェクト: ashang/reviewboard
 def __init__(self, url, body='', headers={}, method='GET'):
     BaseURLRequest.__init__(self, url, body, headers)
     self.method = method
コード例 #4
0
ファイル: service.py プロジェクト: Hackthings/reviewboard
 def __init__(self, url, body='', headers={}, method='GET'):
     BaseURLRequest.__init__(self, url, body, headers)
     self.method = method