platypush/backend/__init__.py
def send_request(self, request, on_response=None,
                     response_timeout=_default_response_timeout, **kwargs):
        """
        Send a request message on the backend.

        :param request: The request, either a dict, a string/bytes UTF-8 JSON, or a platypush.message.request.Request
            object.

        :param on_response: Optional callback that will be called when a response is received. If set, this method will
            synchronously wait for a response before exiting.
        :type on_response: function

        :param response_timeout: If on_response is set, the backend will raise an exception if the response isn't
            received within this number of seconds (default: None)
        :type response_timeout: float
        """

        request = Request.build(request)
        assert isinstance(request, Request)

        request.origin = self.device_id

        if on_response and response_timeout != 0:
            self._setup_response_handler(request, on_response, response_timeout)

        self.send_message(request, **kwargs)

        Send a request message on the backend.

        :param request: The request, either a dict, a string/bytes UTF-8 JSON, or a platypush.message.request.Request
            object.

        :param on_response: Optional callback that will be called when a response is received. If set, this method will
            synchronously wait for a response before exiting.
        :type on_response: function

        :param response_timeout: If on_response is set, the backend will raise an exception if the response isn't
            received within this number of seconds (default: None)
        :type response_timeout: float
        
Send a request message on the backend.
Send a request message on the backend .
def send_request(self, request, on_response=None,
                     response_timeout=_default_response_timeout, **kwargs):
        request = Request.build(request)
        assert isinstance(request, Request)
        request.origin = self.device_id
        if on_response and response_timeout != 0:
            self._setup_response_handler(request, on_response, response_timeout)
        self.send_message(request, **kwargs)
def send_request ( self , request , on_response = None , response_timeout = _default_response_timeout , ** kwargs ) : request = Request . build ( request ) assert isinstance ( request , Request ) request . origin = self . device_id if on_response and response_timeout != 0 : self . _setup_response_handler ( request , on_response , response_timeout ) self . send_message ( request , ** kwargs )
Send a request message on the backend.
Send a request message on the backend .
"""
        Send a request message on the backend.

        :param request: The request, either a dict, a string/bytes UTF-8 JSON, or a platypush.message.request.Request
            object.

        :param on_response: Optional callback that will be called when a response is received. If set, this method will
            synchronously wait for a response before exiting.
        :type on_response: function

        :param response_timeout: If on_response is set, the backend will raise an exception if the response isn't
            received within this number of seconds (default: None)
        :type response_timeout: float
        """
self
request
The request, either a dict, a string/bytes UTF-8 JSON, or a platypush.message.request.Request
object.
The request either a dict a string / bytes UTF - 8 JSON or a platypush . message . request . Request object .
on_response
Optional callback that will be called when a response is received. If set, this method will
synchronously wait for a response before exiting.
Optional callback that will be called when a response is received . If set this method will synchronously wait for a response before exiting .
response_timeout
If on_response is set, the backend will raise an exception if the response isn't
received within this number of seconds (default: None)
If on_response is set the backend will raise an exception if the response isn ' t received within this number of seconds ( default : None )