import { RequestContextStorage } from "./RequestContextStorage"; import type { Dispatcher } from "undici-v6"; import type { Dispatcher as DispatcherV8 } from "undici-v8"; import { Context } from "../../agent/Context"; type OnHeaders = Dispatcher.DispatchHandlers["onHeaders"]; type OnResponseStart = DispatcherV8.DispatchHandler["onResponseStart"]; /** * Wrap the onHeaders function and check if the response is a redirect. If yes, determine the destination URL and call onRedirect. * This is the undici v6 / legacy handler API */ export declare function wrapOnHeaders(orig: OnHeaders, requestContext: ReturnType, context: Context): OnHeaders; /** * Wrap the onResponseStart function (undici v7 / Node.js v26+ handler API) and check if the response is a redirect. * Headers are passed as a plain object with lowercase keys instead of a Buffer array. */ export declare function wrapOnResponseStart(orig: OnResponseStart, requestContext: ReturnType, context: Context): OnResponseStart; export {};