New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support pass metadata via jsonrpc 2.0 #443
Comments
不明白的需求场景。你的需求是什么,有什么问题? rpcx实现的标准rpcjspn2.0协议,除了认证外没有其他扩展 |
正常的情况我能这么做, 使用jsonrpc不行
|
你的jsonrpc是怎么写的? |
抱歉, 我以为你特别熟悉只说了一些关键部分, 应该直接贴复现demo的
client.go
client.sh
|
目前没有办法通过jsonrpc 2.0传递额外的数据,正入你 但是我觉得rpcx可以扩展一下jsonrpc2.0, 让客户端传入meta信息,这个特性考虑加上 |
smallnest
changed the title
jsonrpc 缺乏 AuthFunc里需要的req.Metadata
support pass metadata via jsonrpc 2.0
Apr 10, 2020
smallnest
added a commit
that referenced
this issue
Apr 10, 2020
拉取最新的代码试试。 client.sh curl --header "X-JSONRPC-2.0: true" --header "Authorization: bearer abcdefg1234567" --header "X-RPCX-Meta: hostname=test&deviceID=test" "http://localhost:8972/" -d '{"jsonrpc": "2.0", "method": "Arith.Mul", "params": {"A": 10, "B": 20}, "id": 3}' |
嗯 可以了. 另外问一下 如果想帮忙更新文档 应该怎么操作 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
没想好怎么改, 从params中ReqMetaDataKey么?
The text was updated successfully, but these errors were encountered: