mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-08 22:02:08 +08:00
bugfix: deal with empty base_url
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user