The 'response' event is emitted when a response HEADERS frame has been received for this stream from the connected HTTP/2 server. The listener is invoked with two arguments: an Object containing the received [HTTP/2 Headers Object][], and flags associated with the headers.

    1. const http2 = require('http2');
    2. const client = http2.connect('https://localhost');
    3. const req = client.request({ ':path': '/' });
    4. req.on('response', (headers, flags) => {
    5. console.log(headers[':status']);
    6. });