Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IlcSdk

Entrypoint for SDK that should be used within application server that executes SSR bundle

Hierarchy

Index

Constructors

constructor

  • new IlcSdk(options?: { logger?: IlcSdkLogger }): IlcSdk
  • Parameters

    • options: { logger?: IlcSdkLogger } = {}
      • Optional logger?: IlcSdkLogger

        Default value: console

    Returns IlcSdk

Methods

assetsDiscoveryHandler

  • assetsDiscoveryHandler(req: IncomingMessage, res: ServerResponse, appAssets: AppAssets): void
  • Correctly responds to ILC for the assets discovery request.

    WARNING: this method should never be used in production if application is running in more than a single instance

    Parameters

    • req: IncomingMessage
    • res: ServerResponse
    • appAssets: AppAssets

    Returns void

processRequest

  • processRequest<RegistryProps>(req: IncomingMessage): RequestData<RegistryProps>
  • Processes incoming request and returns object that can be used to fetch information passed by ILC to the application.

    Type parameters

    • RegistryProps

    Parameters

    • req: IncomingMessage

    Returns RequestData<RegistryProps>

processResponse

  • Processes outgoing response and allow conveniently pass information from application back to ILC.

    WARNING: this method should be called before response headers were send.

    Parameters

    Returns void

Generated using TypeDoc