Describe the bug
Pre-run scripts appear to run prior to path substitutions. As a result, if your path is part of an HMAC that is calculated during a pre-run script, it won't have the correct values.
To Reproduce
- Make a Pre-Run script with a single line
tc.request.setHeader("X-Debug", JSON.stringify(tc.request.url))
- Define an endpoint to be called
"url": "/api/v1/exams/{examMetadataId}/questions",
"method": "GET",
"params": [
{
"name": "examMetadataId",
"value": "deadbeef01",
"isPath": true
}
]
- Call the endpoint
- Read the sent headers
- Notice that X-Debug =
http://localhost:5100/api/v1/exams/{examMetadata}/questions
Expected behavior
- The header has the URL with
deadbeef01 substituted for {examMetadata}
- X-Debug =
http://localhost:5100/api/v1/exams/deadbeef01/questions
Platform:
- OS: macOS 14.6.1
- vscode version: Version: 1.119.0 (Universal), Commit: 8b640eef5a6c6089c029249d48efa5c99adf7d51
- node version: 22.21.1
- extension version: 2.40.12
- Paid account
Describe the bug
Pre-run scripts appear to run prior to path substitutions. As a result, if your path is part of an HMAC that is calculated during a pre-run script, it won't have the correct values.
To Reproduce
http://localhost:5100/api/v1/exams/{examMetadata}/questionsExpected behavior
deadbeef01substituted for{examMetadata}http://localhost:5100/api/v1/exams/deadbeef01/questionsPlatform: