-
Hi, I want to extend res object with async method, like this:
But getting this error at runtime, when calling this new method:
Is it possible to avoid this error? |
Beta Was this translation helpful? Give feedback.
Answered by
ghost
Jun 15, 2020
Replies: 1 comment 1 reply
-
This is a message for you to read. When you await anything, that's technically a return. So you cannot use the HttpRequest after this point, you have to copy out whatever you want to keep before you return or await. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a message for you to read. When you await anything, that's technically a return. So you cannot use the HttpRequest after this point, you have to copy out whatever you want to keep before you return or await.