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 2020/01/03 15:27:08 UTC

[GitHub] [dubbo-js] hufeng commented on issue #72: 现在支持上下文传输数据吗

hufeng commented on issue #72: 现在支持上下文传输数据吗
URL: https://github.com/apache/dubbo-js/issues/72#issuecomment-570604126
 
 
   应该按照#36中提示的方法调用,ctx.attachments是一个set方法,所以不是函数,需要使用ctx.attachments =
   {...}来使用。
   
   Bruce-Lee <no...@github.com> 于2020年1月3日周五 上午11:52写道:
   
   > const dubbo = new Dubbo({
   > //todo
   >
   > });
   >
   >
   > dubbo.use(async(ctx, next) => {
   >
   >   const uuid = uuid();
   >
   >   ctx.attachments({
   >
   >      uuid
   >
   >   })
   >
   >   await next();
   >
   > })
   >
   > 按此方法调用有报错(attachment非function),但按#36
   > <https://github.com/apache/dubbo-js/issues/36> 调用成功。
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/dubbo-js/issues/72?email_source=notifications&email_token=AAECEECN2IIKASSWY6HWTVLQ32ZBXA5CNFSM4GJLMWL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIAGWGY#issuecomment-570452763>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAECEEG3PI3ZADNBOI4CW5LQ32ZBXANCNFSM4GJLMWLQ>
   > .
   >
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org