Sort PostData.Params params as well

This commit is contained in:
M. Mert Yildiran
2022-02-08 12:26:42 +03:00
parent d9fdf4ff7e
commit 99b404143b
4 changed files with 14 additions and 3 deletions

View File

@@ -289,6 +289,17 @@ func (h HTTPPayload) MarshalJSON() ([]byte, error) {
}
return harRequest.QueryString[i].Value < harRequest.QueryString[j].Value
})
if harRequest.PostData != nil {
sort.Slice(harRequest.PostData.Params, func(i, j int) bool {
if harRequest.PostData.Params[i].Name < harRequest.PostData.Params[j].Name {
return true
}
if harRequest.PostData.Params[i].Name > harRequest.PostData.Params[j].Name {
return false
}
return harRequest.PostData.Params[i].Value < harRequest.PostData.Params[j].Value
})
}
if testEnvEnabled {
harRequest.URL = ""
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long