Dynamic module urlrouter

Index

Functions

Functions

UrlRouterInternal(handler: (app: "urlrouter".UrlRouterInternal.App) => void): HttpHandler

Parameters

  • handler: (app: "urlrouter".UrlRouterInternal.App) => void

Returns

HttpHandler

App: App

public all(urlpattern: string, handler: HttpHandler)

Parameters

public checkout(urlpattern: string, handler: HttpHandler)

Parameters

public copy(urlpattern: string, handler: HttpHandler)

Parameters

public delete(urlpattern: string, handler: HttpHandler)

Parameters

public get(urlpattern: string, handler: HttpHandler)

Parameters

public head(urlpattern: string, handler: HttpHandler)

Parameters

public lock(urlpattern: string, handler: HttpHandler)

Parameters

public m-search(urlpattern: string, handler: HttpHandler)

Parameters

public merge(urlpattern: string, handler: HttpHandler)

Parameters

public mkactivity(urlpattern: string, handler: HttpHandler)

Parameters

public mkcol(urlpattern: string, handler: HttpHandler)

Parameters

public move(urlpattern: string, handler: HttpHandler)

Parameters

public notify(urlpattern: string, handler: HttpHandler)

Parameters

public options(urlpattern: string, handler: HttpHandler)

Parameters

public patch(urlpattern: string, handler: HttpHandler)

Parameters

public post(urlpattern: string, handler: HttpHandler)

Parameters

public propfind(urlpattern: string, handler: HttpHandler)

Parameters

public proppatch(urlpattern: string, handler: HttpHandler)

Parameters

public put(urlpattern: string, handler: HttpHandler)

Parameters

public redirect(urlpattern: string, to: string)

Parameters

  • urlpattern: string
  • to: string

public report(urlpattern: string, handler: HttpHandler)

Parameters

public search(urlpattern: string, handler: HttpHandler)

Parameters

public subscribe(urlpattern: string, handler: HttpHandler)

Parameters

public trace(urlpattern: string, handler: HttpHandler)

Parameters

public unlock(urlpattern: string, handler: HttpHandler)

Parameters

public unsubscribe(urlpattern: string, handler: HttpHandler)

Parameters

HttpHandler: HttpHandler

(req: ServerRequest, res: ServerResponse, next?: () => void)

Parameters

Options: Options

optional public errorHandler?: (err: Error, req: "urlrouter".UrlRouterInternal.ServerRequest, res: "urlrouter".UrlRouterInternal.ServerResponse) => void

optional public pageNotFound?: (req: "urlrouter".UrlRouterInternal.ServerRequest, res: "urlrouter".UrlRouterInternal.ServerResponse) => void

optional public paramsName?: string

ServerRequest: ServerRequest

constructor(opts?: ReadableOptions): Readable

Parameters

Returns

Readable

public connection: Socket

public headers: any

public httpVersion: string

public method: string

public params: any

public readable: boolean

public trailers: string

public url: string

public _read(size: number)

Parameters

  • size: number

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public pause()

public pipe(destination: T, options?: { end?: boolean; }): T

Parameters

  • destination: T
  • options?: { end?: boolean; } optional

Returns

T

public push(chunk: any, encoding?: string): boolean

Parameters

  • chunk: any
  • encoding?: string optional

Returns

boolean

public read(size?: number): any

Parameters

  • size?: number optional

Returns

any

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public resume()

public setEncoding(encoding?: string)

Parameters

  • encoding?: string optional

public setMaxListeners(n: number)

Parameters

  • n: number

public setMaxListeners(n: number)

Parameters

  • n: number

public unpipe(destination?: T)

Parameters

  • destination?: T optional

public unshift(chunk: string)

Parameters

  • chunk: string

public unshift(chunk: Buffer)

Parameters

public wrap(oldStream: ReadableStream): ReadableStream

Parameters

Returns

ReadableStream

ServerResponse: ServerResponse

constructor(opts?: WritableOptions): Writable

Parameters

Returns

Writable

public sendDate: boolean

public statusCode: number

public writable: boolean

public _write(data: Buffer, encoding: string, callback: Function)

Parameters

  • data: Buffer
  • encoding: string
  • callback: Function

public _write(data: string, encoding: string, callback: Function)

Parameters

  • data: string
  • encoding: string
  • callback: Function

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public addTrailers(headers: any)

Parameters

  • headers: any

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public end()

public end(buffer: Buffer, cb?: Function)

Parameters

  • buffer: Buffer
  • cb?: Function optional

public end(str: string, cb?: Function)

Parameters

  • str: string
  • cb?: Function optional

public end(str: string, encoding?: string, cb?: Function)

Parameters

  • str: string
  • encoding?: string optional
  • cb?: Function optional

public end(data?: any, encoding?: string)

Parameters

  • data?: any optional
  • encoding?: string optional

public getHeader(name: string): string

Parameters

  • name: string

Returns

string

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeHeader(name: string)

Parameters

  • name: string

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public setHeader(name: string, value: string)

Parameters

  • name: string
  • value: string

public setMaxListeners(n: number)

Parameters

  • n: number

public setMaxListeners(n: number)

Parameters

  • n: number

public write(buffer: Buffer): boolean

Parameters

Returns

boolean

public write(buffer: Buffer, cb?: Function): boolean

Parameters

  • buffer: Buffer
  • cb?: Function optional

Returns

boolean

public write(str: string, cb?: Function): boolean

Parameters

  • str: string
  • cb?: Function optional

Returns

boolean

public write(str: string, encoding?: string, cb?: Function): boolean

Parameters

  • str: string
  • encoding?: string optional
  • cb?: Function optional

Returns

boolean

public write(str: string, encoding?: string, fd?: string): boolean

Parameters

  • str: string
  • encoding?: string optional
  • fd?: string optional

Returns

boolean

public write(chunk: any, encoding?: string): any

Parameters

  • chunk: any
  • encoding?: string optional

Returns

any

public writeContinue()

public writeHead(statusCode: number, reasonPhrase?: string, headers?: any)

Parameters

  • statusCode: number
  • reasonPhrase?: string optional
  • headers?: any optional

public writeHead(statusCode: number, headers?: any)

Parameters

  • statusCode: number
  • headers?: any optional

_UrlRouterfunc(handler: (app: "urlrouter".UrlRouterInternal.App) => void, options?: any)

Parameters

  • handler: (app: "urlrouter".UrlRouterInternal.App) => void
  • options?: any optional