@Override protected IncomingMessage<byte[]> handle(HttpRequest request) throws HttpException, IOException { byte[] data = IOUtils.toByteArray(request.getInputStream()); logRequest(request, data); ContentType contentType; try { contentType = new ContentType(request.getContentType()); } catch (ParseException ex) { throw new HttpException(500, "Unparsable Content-Type"); } return new IncomingMessage<byte[]>(contentType, data); }
builder.addByteArrayAsyncEndpoint(new JettyByteArrayAsyncEndpoint()); builder.addRESTAsyncEndpoint(new JettyRESTAsyncEndpoint());
builder.addByteArrayAsyncEndpoint(new JettyByteArrayAsyncEndpoint()); builder.addRESTAsyncEndpoint(new JettyRESTAsyncEndpoint());
@Override protected IncomingMessage<byte[]> handle(HttpRequest request) throws HttpException, IOException { byte[] data = IOUtils.toByteArray(request.getInputStream()); logRequest(request, data); ContentType contentType; try { contentType = new ContentType(request.getContentType()); } catch (ParseException ex) { throw new HttpException(500, "Unparsable Content-Type"); } return new IncomingMessage<byte[]>(contentType, data); }
builder.addByteArrayAsyncEndpoint(new JettyByteArrayAsyncEndpoint()); builder.addRESTAsyncEndpoint(new JettyRESTAsyncEndpoint());
@Override protected IncomingMessage<byte[]> handle(HttpRequest request) throws HttpException, IOException { byte[] data = IOUtils.toByteArray(request.getInputStream()); logRequest(request, data); ContentType contentType; try { contentType = new ContentType(request.getContentType()); } catch (ParseException ex) { throw new HttpException(500, "Unparsable Content-Type"); } return new IncomingMessage<byte[]>(contentType, data); }