use of io.knotx.dataobjects.KnotContext in project knotx by Cognifide.
the class RequestProcessorKnotProxyImpl method createSuccessResponse.
private KnotContext createSuccessResponse(KnotContext inputContext) {
ClientResponse clientResponse = new ClientResponse();
String responseBody = getResponseBodyAsString(inputContext);
clientResponse.setBody(Buffer.buffer(responseBody)).setHeaders(getHeaders(clientResponse, responseBody.length()));
clientResponse.setStatusCode(HttpResponseStatus.OK.code());
return new KnotContext().setClientRequest(inputContext.getClientRequest()).setClientResponse(clientResponse);
}
Aggregations