Added enhancements for http variables support (#2223)

dev
Ice3man 2022-06-28 20:20:18 +05:30 committed by GitHub
parent 8040b66370
commit f3de611b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -222,6 +222,10 @@ func (request *Request) executeTurboHTTP(reqURL string, dynamicValues, previous
// ExecuteWithResults executes the final request on a URL
func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
if request.Pipeline || request.Race && request.RaceNumberRequests > 0 || request.Threads > 0 {
variablesMap := request.options.Variables.Evaluate(generators.MergeMaps(dynamicValues, previous))
dynamicValues = generators.MergeMaps(variablesMap, dynamicValues)
}
// verify if pipeline was requested
if request.Pipeline {
return request.executeTurboHTTP(reqURL, dynamicValues, previous, callback)
@ -229,7 +233,7 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou
// verify if a basic race condition was requested
if request.Race && request.RaceNumberRequests > 0 {
return request.executeRaceRequest(reqURL, previous, callback)
return request.executeRaceRequest(reqURL, dynamicValues, callback)
}
// verify if parallel elaboration was requested