Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EndpointList

Hierarchy

  • EndpointList

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private _endpoints

_endpoints: Endpoint[]

Methods

add

addMany

  • Add multiple endpoints to the endpoint list

    Parameters

    • endpoints: Endpoint[]

      Endpoints to add

      addMany([ endpoint1, endpoint2, ... ])
      

    Returns void

find

  • Find matching endpoints for the selection

    Parameters

    • selector: { path: string; type?: EndpointType }

      Path that has to match the endpoint and (facultative) type of the endpoint

    Returns Endpoint[]

    All the matching endpoints

    const path = '/userLogin?username=...&password=...'
    const endpoint = EndpointList.find({ path, type: 'HTTP' })
    

Static isPathMatching

  • isPathMatching(endpoint: Endpoint, path: string): boolean
  • Checks if the given path matchs the given endpoint

    Parameters

    • endpoint: Endpoint

      Endpoint to check

    • path: string

      Path to check

    Returns boolean

    True if the path matchs the endpoint

    const endpoint = ...
    const path = '/userLogin?username=...&password=...'
    
    const doesMatch = EndpointList.isPathMatching(endpoint, path)
    

Generated using TypeDoc