mwg API
    Preparing search index...

    Class FeedbackClient

    Small, injectable transport for a game's own feedback endpoint.

    import { FeedbackClient } from '@datamoc/mwg/core';

    const feedback = new FeedbackClient({ endpoint: 'https://example.com/api/feedback' });
    await feedback.submit({ message: 'the boss fight softlocks on floor 5', contact: 'a@b.com' });

    Hierarchy (View Summary)

    Index
    endpoint: string
    fetchFn: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    maxResponseBytes: number
    timeoutMs: number
    • the response body as text, refused as soon as it passes maxResponseBytes rather than after it is all in memory

      Parameters

      • response: Response

      Returns Promise<string>