Class AdminClient<Plugins>

A bare admin server client. This is not intended for general use, but can be useful when building admin server plugins to mock non-HTTP protocols and other advanced use cases.

For normal usage of Mockttp, you should use Mockttp.getRemote() instead, to get a Mockttp remote client, which wraps this class with the full Mockttp API for mocking HTTP.

This is part of Mockttp's experimental 'pluggable admin' API. It may change unpredictably, even in minor releases.

Type Parameters

  • Plugins extends {
        [key: string]: AdminPlugin<any, any>;
    }

Hierarchy

  • EventEmitter
    • AdminClient

Constructors

Accessors

Methods

  • List the names of the rule parameters defined by the admin server. This can be used in some advanced use cases to confirm that the parameters a client wishes to reference are available.

    Only defined for remote clients.

    Returns Promise<string[]>

  • Type Parameters

    Parameters

    Returns Promise<{
        [n in string | number | symbol]: Queries[n<n>] extends AdminQuery<any, R>
            ? R
            : never
    }>