-
Can anybody help me? Thank You! |
Beta Was this translation helpful? Give feedback.
Answered by
targos
Jul 19, 2021
Replies: 2 comments 6 replies
-
You can't. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
RedYetiDev
-
Thank you. I already did like what you say.
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2021年8月14日(星期六) 晚上7:16
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [nodejs/node] How can I know a function is called by await? (#39439)
I don't think there is a way to tell if the API call is awaited or no, but I think you can do something like, inside ur body keep a key isAwait which is a boolean so depending on that server B will decide if it needs to send a res back or no. I hope that helps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can't.
await
only has an effect on the value returned by the function. It's impossible to detect it from within the function.