dromara / fast-request

IntelliJ IDEA plugin Restful Fast Request
https://api-buddy.com/en
Other
453 stars 116 forks source link

[Bug]: Environment variable values set in pre-request script are not used in current request #333

Closed Todd-PDCFlow closed 3 months ago

Todd-PDCFlow commented 4 months ago

Checklist

Which operating system are you using?

IDEA version

IntelliJ IDEA 2024.1.4 (Ultimate Edition)

Plugin version

2024.1.6

Describe the bug

If I set an environment variable in the pre-request script, the new value is NOT used by the current request

Request is configured with the environment variable {{batchId}} as a Path Param RequestConfig

The environment variable batchId is changed during the Api-Level pre-request Script and validated via console.print statements pre-request script

The environment variable is also confirmed via the post-request Script post-request script

You can see by the console output the previous value of the environment variable batchId is being used in the current request, not the new value that was set during the pre-request script console output

Error log

No response

kings1990 commented 4 months ago

@Todd-PDCFlow Thank you very much for describing the process of generating the bug in great detail. I will fix it in the next version. So in current you need to send the request again to insure the request use the new environment value

kings1990 commented 3 months ago

Fixed in 2014.1.6.2