Add postman to code snippet languages list
Is there an existing request for this feature?
- [X] I have searched the existing issues for this feature request and I know that duplicates will be closed
Is your feature request related to a problem?
Should be usefull using code snippet for generate requests script with also correct functions for get/set variables.
Describe the solution you'd like
1)Add postman to code snippet languages list and create a complete snippet with postman functions (also variables get/set)
- Send a request in the script by link or id or id, but if I need some different variables I have to create a new request for every variation.
Describe alternatives you've considered
- I use nodejs Axsios code snippet and replace the final values and the axios call with correct functions call. but is really annoyng and slow.
Additional context
Example:
I have a request like this
base-url, user-username and user-password are environment variables in the test I use the result to set the environment variable access-token
I need to use the login before a set of other requests to obtain token to use in that requestes.
So I use the pre request script
The pre-request script that do exactly the same thing of the preview request is this
I had to write manually the pre request or I could use the code snippet tath prouce the code below and modify it to take the values from the variables.
This is a simple example but more complex situations may exist. This is why I believe that a feature like a postamn code snippet producer could be useful to produce the expected result (what I wrote in the third image) more quickly and easily.
I think I am missing something here. What do you mean by "correct functions for get/set variables"?
For me the variables set in the variables tab are corectly templated into the script. Could you provide a screenshot of what clarifying this?
I think I am missing something here. What do you mean by "correct functions for get/set variables"?
For me the variables set in the variables tab are corectly templated into the script. Could you provide a screenshot of what clarifying this?
Sorry, I didn't explain well. I provided an example.