Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HTTPTransport

RESTful interface to Janus API

Basic usage example:

import {HTTPTransport} from '@lilusoft/janus-admin';
const transport = new HTTPTransport("http://server:7088/admin", "janusoverlord", true);
export

Hierarchy

Index

Constructors

constructor

  • new HTTPTransport(url: string, admin_secret: string, isAdmin: boolean): HTTPTransport
  • Creates an instance of HTTPTransport

    memberof

    HTTPTransport

    Parameters

    • url: string

      Janus Admin API Url, i.e http://server:7088/admin, true

    • admin_secret: string

      Admin secret as configured in janus config file, i.e. janusoverlord

    • isAdmin: boolean

      should always be true for Admin API

    Returns HTTPTransport

Methods

dispose

  • dispose(): Promise<void>
  • Cleanup

    Unused in HTTP

    memberof

    HTTPTransport

    Returns Promise<void>

isAdminEndpoint

  • isAdminEndpoint(): boolean
  • True if this transport is pointing to Admin API

    memberof

    HTTPTransport

    Returns boolean

request

  • Executes a request against Janus API

    template

    ResponseT

    memberof

    HTTPTransport

    Type parameters

    • ResponseT

    Parameters

    Returns Promise<ResponseT>

waitForReady

  • waitForReady(): Promise<boolean>
  • Waits for the Transport to be ready

    Unused in HTTP

    memberof

    HTTPTransport

    Returns Promise<boolean>

Generated using TypeDoc