refactor: Split off ErrorResponseWriter

This commit is contained in:
Joachim Van Herwegen
2020-10-26 12:05:39 +01:00
parent f4161d406c
commit e8fdcb0ad0
18 changed files with 150 additions and 72 deletions

View File

@@ -3,12 +3,11 @@ import type { HttpHandler,
import {
AllowEverythingAuthorizer,
AuthenticatedLdpHandler,
BasicResponseWriter,
MethodPermissionsExtractor,
UnsecureWebIdExtractor,
} from '../../index';
import type { ServerConfig } from './ServerConfig';
import { getOperationHandler, getInMemoryResourceStore, getBasicRequestParser } from './Util';
import { getOperationHandler, getInMemoryResourceStore, getBasicRequestParser, getResponseWriter } from './Util';
/**
* BasicConfig works with
@@ -33,7 +32,7 @@ export class BasicConfig implements ServerConfig {
const operationHandler = getOperationHandler(this.store);
const responseWriter = new BasicResponseWriter();
const responseWriter = getResponseWriter();
const handler = new AuthenticatedLdpHandler({
requestParser,