Skip to main content
Deno 2 is finally here 🎉️
Learn more
class AkiHttpListener
implements IHttpListener
import { AkiHttpListener } from "https://deno.land/x/sptaki@1.2.0/servers/http/mod.ts";

Constructors

new
AkiHttpListener(
httpRouter: HttpRouter,
serializers: Serializer[],
logger: ILogger,
requestsLogger: ILogger,
jsonUtil: JsonUtil,
httpResponse: HttpResponseUtil,
localisationService: LocalisationService,
)

Properties

protected
httpResponse: HttpResponseUtil
protected
httpRouter: HttpRouter
protected
jsonUtil: JsonUtil
protected
localisationService: LocalisationService
protected
logger: ILogger
protected
requestsLogger: ILogger
protected
serializers: Serializer[]

Methods

protected
getBodyInfo(body: Buffer, requestUrl?: any): any
canHandle(_: string, req: IncomingMessage): boolean
getResponse(
sessionID: string,
body: Buffer,
): string
handle(
sessionId: string,
): void
sendJson(
output: string,
sessionID: string,
): void
sendResponse(
sessionID: string,
body: Buffer,
output: string,
): void

Send http response to the client

sendZlibJson(
output: string,
sessionID: string,
): void