variable DEFAULT_HEADERS

What a session sends before you have said anything about headers.

A browser's own two: the user-agent a Chrome on this platform would send, and JSON for the accept — which is what a prompt pointed at an API wants nine times out of ten, and the thing people forget to set before wondering why they got HTML back. They are SAVED rather than applied at send time, so .header list shows them, .header delete accept drops one, and nothing is sent that you cannot see.

The version here goes stale; the session replaces it with the page's own navigator.userAgent on start-up, which is the same string with the real numbers in it.

import { DEFAULT_HEADERS } from './http-service.ts';

DEFAULT_HEADERS.get('accept'); // 'application/json'
DEFAULT_HEADERS.get('user-agent')?.includes('Chrome'); // true

Type

ReadonlyMap<string, string>

Usage

import { DEFAULT_HEADERS } from "lib/repl/http-service.ts";