I run crossbar client with the runner of crossbar which run in the asyncio event loop. I want to call RPC by the trigger in tkinter. Is there any solution to combine them together?
            Asked
            
        
        
            Active
            
        
            Viewed 142 times
        
    1 Answers
0
            
            
        You can make an HTTP request to call your RPC. Everything described here Crossbar HTTP Bridge Caller. Quick summary what you need to do:
- Make configuration:
 
The HTTP Caller is configured on a path of a Web transport - here is part of a Crossbar configuration:
{ "workers": [ { "type": "router", ... "transports": [ { "type": "web", ... "paths": { ... "call": { "type": "caller", "realm": "realm1", "role": "anonymous" } } } ] } ] }
- In your application make HTTP request
 
For example, using curl:
curl -H "Content-Type: application/json" \
    -d '{"procedure": "com.example.add2", "args": [1, 2]}' \
    http://127.0.0.1:8080/call
        Oleksandr Yarushevskyi
        
- 2,789
 - 2
 - 17
 - 24