requestContext.setEntityStream(request.getInputStream());
for (String headerName : request.getNames()) {
requestContext.headers(headerName, request.getValue(headerName));
}
requestContext.setWriter(responseWriter);
requestContext.setRequestScopedInitializer(new RequestScopedInitializer() {
@Override
public void initialize(ServiceLocator locator) {
locator.<Ref<Request>>getService((new TypeLiteral<Ref<Request>>() {
}).getType()).set(request);
locator.<Ref<Response>>getService((new TypeLiteral<Ref<Response>>() {