def emit(self, action, payload):
        """Emit action with payload via `requests.post`."""
        url = self.get_emit_api(action)
        headers = {
            'User-Agent': 'rio/%s' % VERSION,
            'X-Rio-Protocol': '1',
        }
        args = dict(
            url=url,
            json=payload,
            headers=headers,
            timeout=self.timeout,
        )
        resp = requests.post(**args)
        data = resp.json()
        is_success = resp.status_code == 200
        result = dict(
            is_success=is_success,
            message=data['message'],
        )
        if result['is_success']:
            result.update(
                event_uuid=data['event']['uuid'],
                task_id=data['task']['id'],
            )
        return result
Emit action with payload via `requests.post`.