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
not available global var in callback #1300
Comments
Hello, I'm experiencing the same issue. I want to parametrize some fields of the body of the callback based on the initial call, but it's not possible to do with global variables, I don't know if there is any other way. Here's a minimal example of the problem: If I make one call to the mock, the return of the callback is empty. However, if I repeat the call a second time, the field is filled correctly with the global variable. Mockoon version: 7.0.0 |
Callbacks were executed before generating the response template, they couldn't access global vars. Move execution before sending but after generating templates. Closes #1300
Thanks for reporting. |
Callbacks were executed before generating the response template, they couldn't access global vars. Move execution before sending but after generating templates. Closes #1300
Callbacks were executed before generating the response template, they couldn't access global vars. Move execution before sending but after generating templates. Closes #1300
Callbacks were executed before generating the response template, they couldn't access global vars. Move execution before sending but after generating templates. Closes #1300
Callbacks were executed before generating the response template, they couldn't access global vars. Move execution before sending but after generating templates. Closes #1300
📦 This was fixed in v8.0.0 |
not available global var in callback
variables are not available
in callback calls request parameters are not available in callback calls
Steps to Reproduce
I tried using SetGlobalVar
{{setGlobalVar 'test123' (int 0 99999999999)}}
in callback
test123={{getGlobalVar 'test123'}}
the variable is not available
Mockoon version:
6.0.1
OS / OS version:
Linux Ubuntu 22.04, etc -->
The text was updated successfully, but these errors were encountered: