import type { Result } from "./result.js"; type HttpResponse = { readonly status: number; readonly isOk: boolean; readonly json: unknown; readonly rawText: string; }; type HttpOptions = { readonly method?: string; readonly headers?: Record; readonly body?: string; readonly timeoutMs?: number; }; type HttpFailure = { readonly kind: "dns" | "refused" | "timeout" | "tls" | "network"; readonly host: string; readonly detail: string; }; declare const classifyFetchError: (e: unknown, url: string) => HttpFailure; declare const httpJson: (url: string, options?: HttpOptions) => Promise>; declare const networkRemedy: (failure: HttpFailure) => string; export { httpJson, classifyFetchError, networkRemedy }; export type { HttpResponse, HttpOptions, HttpFailure };