import { fetch as undiciFetch } from 'undici';
import { HTTP } from './BaseHttp.js';
export class NodeHTTP extends HTTP {
    constructor(dispatcher) {
        // fetch is implemented by undici for node 16.5+
        // fetch is implemented by node internally for node 18+ - do we need undici anymore?
        super(undiciFetch, dispatcher);
    }
    assertEnvironment() {
        if (typeof global === 'undefined') {
            throw new Error('NodeHTTP can only be provided by a node runtime');
        }
    }
}
