You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2023/01/05 05:22:53 UTC
[GitHub] [dubbo-go] rsaLive opened a new issue, #2158: 如何在client过滤器中获取http header
rsaLive opened a new issue, #2158:
URL: https://github.com/apache/dubbo-go/issues/2158
客户端是gin加dubbo-go ,现在想把http请求的header传到生产者那边,为了不要每个请求都写传入上下文代码,就放到了filter中,filter中去设置上下文,但是filter中不知道怎么去获取header参数,我断点看到了传递的body参数,但是没看到header
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks commented on issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #2158:
URL: https://github.com/apache/dubbo-go/issues/2158#issuecomment-1363960848
@binbin0325 这边会继续跟进,大概会给你写个 demo 程序。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks commented on issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #2158:
URL: https://github.com/apache/dubbo-go/issues/2158#issuecomment-1371795513
Please do not close this issue. We left it open to let other friends know how to handle it when they meet such a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] rsaLive commented on issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
rsaLive commented on issue #2158:
URL: https://github.com/apache/dubbo-go/issues/2158#issuecomment-1356282104
> header 放在 attachment 是可以传到 server 端的。
我知道放在attachment可以传,但是在过client的 滤器里面不知道怎么获取。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] rsaLive closed issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
rsaLive closed issue #2158: 如何在client过滤器中获取http header
URL: https://github.com/apache/dubbo-go/issues/2158
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] binbin0325 commented on issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
binbin0325 commented on issue #2158:
URL: https://github.com/apache/dubbo-go/issues/2158#issuecomment-1364636719
在dubbo 的client中肯定没有办法获取header,因为dubbo就没有这个概念。 但是可以在gin中获取header,然后把header的k、v转换成dubbo的attachment。这样就能发送到server端了。
如何设置attachment可以参考:https://github.com/apache/dubbo-go-samples/blob/master/context/dubbo/go-client/cmd/client.go#L64
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] rsaLive closed issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
rsaLive closed issue #2158: 如何在client过滤器中获取http header
URL: https://github.com/apache/dubbo-go/issues/2158
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks commented on issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #2158:
URL: https://github.com/apache/dubbo-go/issues/2158#issuecomment-1354806551
header 放在 attachment 是可以传到 server 端的。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks commented on issue #2158: 如何在client过滤器中获取http header
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #2158:
URL: https://github.com/apache/dubbo-go/issues/2158#issuecomment-1354806887
@binbin0325 请继续回复你的理解
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org