filesystem request storage #798
kovalvalerii
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Huachao Mao,
Here is the approach I use to run requests on few target env. to different apis with different credentials:
@authtoken = {{$dotenv authToken}}
@tariffId = {{$dotenv tariffId}}
The only issue I have is the problem with storing "get token" response in the .env file variable when I need to switch to new env.
Now I do next:
Now the @authtoken = {{$dotenv authToken}} line is ready to get updated token and to use it in any request from the folder.
Idea:
I'd like to propose to add posibility to save response value in .env file as a var
{{$dotenv authToken}} = {{login.response.body.$.type}} {{login.response.body.$.accessToken}}
similar to setting a file variable:
@authtoken = {{login.response.body.$.type}} {{login.response.body.$.accessToken}}
The action will run each time we get positive "login" request result.
To update any .env var after the line changes (for ex. => {{$dotenv authToken11111}} = {{login.response.body.$.accessToken}} )
the end user must run the request again.
I guess it's the simplest way to implement the feature.
Beta Was this translation helpful? Give feedback.
All reactions