知识卡片
JSON-RPC方法与ID关联
JSON-RPC 请求包含 method、params 和请求 id;响应通过相同的 id 关联结果或错误。协议把远程方法调用编码成 JSON 消息,适合先明确方法契约的场景;客户端仍须处理错误与版本兼容。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》附录 A《Types of web APIs and protocols》(源文件:_epub-src/OEBPS/Text/A.htm)
- 结论依据:原文列出 JSON-RPC 请求 method、params、id 以及响应 result、error、id 的对应关系。
- 原始内容:JSON-RPC payloads usually include three properties: method —The method or function that the client wishes to invoke in the remote server params —The parameters that must be passed to the method or function on invocation id —A