GET = 'GET',
PUT = 'PUT',
POST = 'POST',
- PATCH = 'PATCH',
+ PATCH = 'PATCH'
}
export class UIHttpServer extends AbstractUIServer {
}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
- this.authenticate(req, (err) => {
+ this.authenticate(req, err => {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
const [protocol, version, procedureName] = req.url?.split('/').slice(1) as [
Protocol,
ProtocolVersion,
- ProcedureName,
+ ProcedureName
]
const uuid = generateUUID()
this.responseHandlers.set(uuid, res)
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
- req.on('error', (error) => {
+ req.on('error', error => {
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error