LWT JavaScript API
    Preparing search index...

    Function apiPost

    • Make a POST request to the API.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        API endpoint

      • body: Record<string, unknown>

        Request body (will be JSON-stringified)

      Returns Promise<ApiResponse<T>>

      Promise resolving to ApiResponse with data or error

      const response = await apiPost<Term>('/terms', { text: 'hello', langId: 1 });