bugfix: deal with empty base_url

This commit is contained in:
buyuxiang
2022-05-30 20:56:11 +08:00
parent 8ed2f84cf5
commit 4f855de419
2 changed files with 6 additions and 3 deletions

View File

@@ -145,7 +145,10 @@ func (r *requestBuilder) prepareUrlParams(stepVariables map[string]interface{})
log.Error().Err(err).Msg("parse request url failed")
return err
}
baseURL := stepVariables["base_url"].(string)
var baseURL string
if stepVariables["base_url"] != nil {
baseURL = stepVariables["base_url"].(string)
}
rawUrl := buildURL(baseURL, convertString(requestUrl))
// prepare request params