method LegacyUserAgent.get
Private
LegacyUserAgent.get(
url: string,
headers?: Record<string, string>
): Promise<{ result: LegacyHttpResult; }>

headers, when given, are merged on top of this instance's own default headers (set via transactor/on) for this one request only — mirrors real Mojo::UserAgent's own ->get($url => {'Header-Name' => 'value'}) calling convention.

Parameters

url: string
optional
headers: Record<string, string>

Return Type

Promise<{ result: LegacyHttpResult; }>

Usage

import { type LegacyUserAgent } from "plugins/legacy-globals.d.ts";