resp.proto can never be checked with h2 or h2c. It can only be checked against HTTP/2.0 or HTTP/1.1, but what do I for HTTP/2 without TLS encryption?
import http from "k6/http";
import { check, sleep } from "k6";
export default function() {
let res = http.get("https://www.bbc.co.uk/");
check(res, {
"protocol is HTTP/2": (r) => r.proto === 'h2'
});
sleep(1);
}
For example, this is what you have in your documentation. The check actually fails because it cannot be compared with h2. However, it works if you change this to HTTP/2.0. It would be great if you give me a solution for HTTP/2.0 with clear text.