User Tools

Site Tools


tanszek:oktatas:iss_t:json-rpc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tanszek:oktatas:iss_t:json-rpc [2026/03/01 17:26] kneheztanszek:oktatas:iss_t:json-rpc [2026/03/01 17:27] (current) – [JSON-RPC Client (Python)] knehez
Line 24: Line 24:
 A JSON-RPC request is a JSON object with the following fields: A JSON-RPC request is a JSON object with the following fields:
  
-jsonrpc – must be "2.0" +  * **jsonrpc** – must be "2.0" 
- +  * **method** – name of the remote method 
-method – name of the remote method +  * **params** – parameters (optional) 
- +  * **id** – request identifier (used to match response)
-params – parameters (optional) +
- +
-id – request identifier (used to match response)+
  
 Example request: Example request:
Line 160: Line 157:
 import requests import json import requests import json
  
-url = "http://localhost:5000/rpc +url = "http://localhost:5000/rpc"
-"+
  
 payload = { payload = {
-"jsonrpc": "2.0", +  "jsonrpc": "2.0", 
-"method": "add", +  "method": "add", 
-"params": [10, 15], +  "params": [10, 15], 
-"id": 1+  "id": 1
 } }
  
tanszek/oktatas/iss_t/json-rpc.1772385967.txt.gz · Last modified: 2026/03/01 17:26 by knehez