This commit is contained in:
Joon Lee 2019-11-04 18:04:34 -08:00
Родитель 86dc0d90df
Коммит 696d3c7a74
2 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -38,7 +38,7 @@ Protocol: HTTP/2
OutFile: "out/res.hgrm"
Request:
# HTTPMethod defaults to GET if Body or BodyPath (below) is not present and to POST otherwise, but can be specified explicitly
# HTTPMethod defaults to GET if Body or BodyFile (below) is not present and to POST otherwise, but can be specified explicitly
HTTPMethod: POST
# ExpectedHTTPStatusCode defaults to 200
@ -78,4 +78,4 @@ Request:
}
# POST request body. This will override the Body above.
BodyPath: path/to/file
BodyFile: path/to/file

Просмотреть файл

@ -113,9 +113,7 @@ func (w *WebRequesterFactory) GetRequester(uint64) bench.Requester {
// if BodyFile is specified Body is ignored
if w.BodyFile != "" {
content, err := ioutil.ReadFile(w.BodyFile)
if err != nil {
maybePanic(err)
}
maybePanic(err)
w.Body = string(content)
}