Need to get http response status line

Hi

For a test we need to get the response status-line as described in 6.1 of the http RFC https://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html

I can’t find any way in k6 to actually access the status line itself.

Is it possible?

It could be something like:

HTTP/1.1 500 Internal error caused by flooding in the Amazon river

and the “Internal error caused by flooding in the Amazon river” is what I need to find.

1 Like

Yeah, you’re right, there’s no way to get the status line text from k6 right now… :disappointed: I added an issue for adding it: https://github.com/loadimpact/k6/issues/1585 If you’re up to it, feel free to submit a PR, it should be very simple to add - the test is probably going to be more complicated than the implementation :sweat_smile:

1 Like