Пример #1
0
    def __init__(self, request, content_type):
        TransportContext.__init__(self, 'http')

        self.req = request
        """HTTP Request. This is transport-specific"""

        assert isinstance(content_type, str)
        self.resp_headers = {
            'Content-Type': content_type,
            'Content-Length': None,
        }
        """HTTP Response headers."""

        self.resp_code = None
        """HTTP Response code."""

        self.wsdl = None
        """The WSDL document that is being returned. Only relevant when handling
        WSDL requests."""

        self.wsdl_error = None
        """The error when handling WSDL requests."""
Пример #2
0
    def __init__(self, req_env, content_type):
        TransportContext.__init__(self, 'wsgi')

        self.req_env = req_env
        """WSGI Request environment"""

        self.resp_headers = {
            'Content-Type': content_type,
            'Content-Length': None,
        }
        """HTTP Response headers."""

        self.resp_code = None
        """HTTP Response code."""

        self.req_method = req_env.get('REQUEST_METHOD', None)
        """HTTP Request verb, as a convenience to users."""

        self.wsdl = None
        """The WSDL document that is being returned. Only relevant when handling
        WSDL requests."""

        self.wsdl_error = None
        """The error when handling WSDL requests."""
Пример #3
0
    def __init__(self, req_env, content_type):
        TransportContext.__init__(self, 'wsgi')

        self.req_env = req_env
        """WSGI Request environment"""

        self.resp_headers = {
            'Content-Type': content_type,
            'Content-Length': None,
        }
        """HTTP Response headers."""

        self.resp_code = None
        """HTTP Response code."""

        self.req_method = req_env.get('REQUEST_METHOD', None)
        """HTTP Request verb, as a convenience to users."""

        self.wsdl = None
        """The WSDL document that is being returned. Only relevant when handling
        WSDL requests."""

        self.wsdl_error = None
        """The error when handling WSDL requests."""