Compare commits

..

No commits in common. "3cd72855e5ae30eeda77b8d2bf217764b4347eca" and "0aeeb484e200b337074a34baf1cc918c83c64cdb" have entirely different histories.

View File

@ -132,14 +132,13 @@ func (c *Config) Validate() []error {
var errs []error
if utils.IsNilOrZero(c.URL) {
errs = append(errs, errors.New("request URL is required"))
} else {
}
if c.URL.Scheme == "" {
c.URL.Scheme = "http"
}
if c.URL.Scheme != "http" && c.URL.Scheme != "https" {
errs = append(errs, errors.New("request URL scheme must be http or https"))
}
urlParams := types.Params{}
for key, values := range c.URL.Query() {
for _, value := range values {
@ -151,7 +150,6 @@ func (c *Config) Validate() []error {
}
c.Params = append(urlParams, c.Params...)
c.URL.RawQuery = ""
}
if utils.IsNilOrZero(c.Method) {
errs = append(errs, errors.New("request method is required"))