@flowscripter/io-gateway-http
    Preparing search index...

    Class HttpGateway

    A local HTTP server on a loopback ephemeral port that serves IOProvider locations. Access is by grant: each grant has a random token as the first path segment, so relative references below the grant URL resolve against its root and no client configuration is needed.

    Index
    • Revokes every grant, waits for in-flight writes to settle, then stops the server: responses in progress get graceMs to finish before their connections are closed.

      Parameters

      • graceMs: number = 1000

      Returns Promise<void>

    • Serves a container or single entry of provider. The provider must be of the js payload kind and stays owned by the caller.

      Parameters

      • provider: IOProvider<Js>
      • target: LocationTarget
      • options: GrantOptions

      Returns GatewayGrant

    • Resolves location to a js provider and serves its target. The grant owns the provider and disposes it when revoked.

      Parameters

      • resolver: ProviderResolver
      • location: string
      • options: GrantOptions

      Returns Promise<GatewayGrant>