Need to get http response status line


For a test we need to get the response status-line as described in 6.1 of the http RFC HTTP/1.1: Response

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: Export the status line text in HTTP response objects · Issue #1585 · grafana/k6 · GitHub 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