svsmate - v1.1.1
    Preparing search index...

    Thin wrapper around node-fetch that

    1. automatically attaches / persists cookies via CookieStore;
    2. applies a consistent user-agent;
    3. defaults to manual redirect handling (the caller decides what to do with 302 responses).

    Every successful network round-trip is not persisted automatically anymore; instead call saveCookies at explicit checkpoints (e.g. after a login probe succeeds).

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Sends a GET request with sensible defaults.

      Parameters

      • url: string

        Absolute target URL.

      • init: RequestInit = {}

        Optional fetch options (overrides defaults).

      Returns Promise<Response>

    post

    • post(url: string, body: any, init?: RequestInit): Promise<Response>

      Sends a POST request.

      Parameters

      • url: string

        Absolute target URL.

      • body: any

        Request body (string or URLSearchParams).

      • init: RequestInit = {}

        Optional fetch options (overrides defaults).

      Returns Promise<Response>