Exemplo n.º 1
0
 private static ContainerResponse request(
     RequestHandler handler,
     ContainerResponseWriter wr,
     String method,
     URI reqUri,
     URI baseUri,
     byte[] data,
     InputHeadersMap headers)
     throws Exception {
   InputStream in = data != null ? new ByteArrayInputStream(data) : null;
   ContainerRequest creq = new ContainerRequest(method, reqUri, baseUri, in, headers);
   ContainerResponse cres = new ContainerResponse(wr);
   handler.handleRequest(creq, cres);
   return cres;
 }