Skip to main content
The Deno 2 Release Candidate is here
Learn more
class HttpServerHelper
import { HttpServerHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/HttpServerHelper.d.ts";

Constructors

new
HttpServerHelper(configServer: ConfigServer)

Properties

protected
configServer: ConfigServer
protected
httpConfig: IHttpConfig
protected
mime: { css: string; bin: string; html: string; jpg: string; js: string; json: string; png: string; svg: string; txt: string; }

Methods

buildUrl(): string

Combine ip and port into address

getBackendUrl(): string

Prepend http to the url:port

getMimeText(key: string): string
getWebsocketUrl(): string

Get websocket url + port

sendTextJson(resp: any, output: any): void