torque-pro-assistant - v1.0.0
    Preparing search index...
    • post<RequestBody extends BodyInit | null | undefined, ResponseBody = unknown>(
          requestBody: RequestBody,
          route: string,
          onSuccess: (data: ResponseBody) => void,
          onError?: (error: unknown) => void,
      ): void

      Issues a POST to the Python/Flask backend at the bridge-supplied port, with Content-Type: application/json.

      Type Parameters

      • RequestBody extends BodyInit | null | undefined
      • ResponseBody = unknown

      Parameters

      • requestBody: RequestBody

        Body payload (already serialized) to send.

      • route: string

        Path under the Flask root (no leading slash).

      • onSuccess: (data: ResponseBody) => void

        Callback invoked with the parsed JSON body.

      • OptionalonError: (error: unknown) => void

        Optional callback for fetch failures. Defaults to console.error.

      Returns void