Skip to content
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

Improvements for Insomnia Pre-request Script Overview documentation #245

Open
3 tasks done
bartoszWesolowski opened this issue Jan 15, 2025 · 0 comments
Open
3 tasks done

Comments

@bartoszWesolowski
Copy link

Code of Conduct

What article on docs.insomnia.rest is affected?

https://docs.insomnia.rest/insomnia/pre-request-script

What part(s) of the article would you like to see updated?

Variables Manipulation

Additional information

Hello,

I am writing some scripts for Insomnia collections and found it difficult to understand how variables are evaluated. I would be great to include additional info in the documentation, for example:

  1. There are multiple objects that I can use to get variables: insomnia.environment, insomnia.baseEnvironment, insomnia.variables - it would be great to have an implicit documentation that would state which object reference which variables (base configuration, collection environment, folder variables).
  2. We have multiple levels of configuration, it would be grate do have documentation that states how they are evaluated, is sub-config json merged with the parent config or it override all? Same for collection config and sub configs, directory variables.
  3. How to access folder variables and how are they merged in the folder hierarchy. I have collection env with variable x=col-env-value, and I also added a folder, on which I created environment variable x=dir-env-value. How this folder level variable can be accessed in script? Script is on parent folder, variables on child folder.

Best regards,
Bartek

Code of Conduct and Community Expectations

  • I agree to follow this project's Code of Conduct
  • I agree to abide by the Community Expectations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant