two-slot-extended-mags/types/helpers/HttpServerHelper.d.ts
2024-04-03 20:15:11 +11:00

33 lines
869 B
TypeScript

import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
export declare class HttpServerHelper {
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;
};
constructor(configServer: ConfigServer);
getMimeText(key: string): string;
/**
* Combine ip and port into url
* @returns url
*/
buildUrl(): string;
/**
* Prepend http to the url:port
* @returns URI
*/
getBackendUrl(): string;
/** Get websocket url + port */
getWebsocketUrl(): string;
sendTextJson(resp: any, output: any): void;
}