electron-react-python-template - v1.0.0
    Preparing search index...
    • post<TBody extends BodyInit | null | undefined, TResp = unknown>(
          body: TBody,
          route: string,
          callback: (data: TResp) => void,
          errorCallback?: (error: unknown) => void,
      ): void

      Helper POST method for sending requests to and from the Python/Flask services.

      Type Parameters

      • TBody extends BodyInit | null | undefined
      • TResp = unknown

      Parameters

      • body: TBody

        request body of data that you want to pass.

      • route: string

        URL route of the Python/Flask service you want to use.

      • callback: (data: TResp) => void

        optional callback function to be invoked if provided.

      • OptionalerrorCallback: (error: unknown) => void

      Returns void

      response data from Python/Flask service.