is it possible to see the content of a POST request in the logs?
I have some 500 errors and I’m getting data from a big jdbc feeder. If I activate logs I can see errors like :
status=
500 Internal Server Error
headers= …
But I would like to see the body content for each failed request, to see if the content was wrong or if the server is not able to respond
We could print more info on debug level, but that would considerably slow down the engine. So I agree this could be interesting, but mainly for debugging purpose.
.responseInfoExtractor { response =>
if (response.getStatusCode != 200) {
val extendedResponse = response.asInstanceOf[com.excilys.ebi.gatling.http.response.ExtendedResponse] // will change hook signature so that you don’t have to cast
println(extendedResponse.request.getStringData) // search com.ning.http.client.Request for the data your interested in
}
Nil
}
I tried to implement your code below but I am getting the error:
value responseInfoExtractor is not a member of com.excilys.ebi.gatling.http.request.builder.PostHttpRequestBuilder