piwebasync/http/client.py
def _validate_protocol(self, request: APIRequest) -> None:
        """
        Validate request is an HTTP request
        
        Raises
            - TypeError: request is not an APIRequest
            - ValueError: invalid protocol for request
        """
        if not isinstance(request, APIRequest):
            raise TypeError(f"'request' must be instance of APIRequest. Got {type(request)}")
        if request.protocol != "HTTP":
            raise ValueError(
                f"Invalid protocol for {self.__class__.__name__}. Expected 'HTTP', "
                f"got '{request.protocol}'. If this is a websocket request, use the WebsocketClient"
            )

        Validate request is an HTTP request
        
        Raises
            - TypeError: request is not an APIRequest
            - ValueError: invalid protocol for request
        
Validate request is an HTTP request
Raises
TypeError: request is not an APIRequest
ValueError: invalid protocol for request
Validate request is an HTTP request Raises TypeError : request is not an APIRequest ValueError : invalid protocol for request
def _validate_protocol(self, request: APIRequest) -> None:
        if not isinstance(request, APIRequest):
            raise TypeError(f"'request' must be instance of APIRequest. Got {type(request)}")
        if request.protocol != "HTTP":
            raise ValueError(
                f"Invalid protocol for {self.__class__.__name__}. Expected 'HTTP', "
                f"got '{request.protocol}'. If this is a websocket request, use the WebsocketClient"
            )
def _validate_protocol ( self , request : APIRequest ) -> None : if not isinstance ( request , APIRequest ) : raise TypeError ( f"'request' must be instance of APIRequest. Got {type(request)}" ) if request . protocol != "HTTP" : raise ValueError ( f"Invalid protocol for {self.__class__.__name__}. Expected 'HTTP', " f"got '{request.protocol}'. If this is a websocket request, use the WebsocketClient" )
Validate request is an HTTP request
Raises
 TypeError: request is not an APIRequest
 ValueError: invalid protocol for request
Validate request is an HTTP request Raises TypeError : request is not an APIRequest ValueError : invalid protocol for request
"""
        Validate request is an HTTP request
        
        Raises
            - TypeError: request is not an APIRequest
            - ValueError: invalid protocol for request
        """
self
request
APIRequest