• origins {string[]}

    The 'origin' event is emitted whenever an ORIGIN frame is received by the client. The event is emitted with an array of origin strings. The http2session.originSet will be updated to include the received origins.

    1. const http2 = require('http2');
    2. const client = http2.connect('https://example.org');
    3. client.on('origin', (origins) => {
    4. for (let n = 0; n < origins.length; n++)
    5. console.log(origins[n]);
    6. });

    The 'origin' event is only emitted when using a secure TLS connection.