@Override
  public void close() {
    super.close();
    logger.trace("Closing NettyMultipartRequest with {} raw content chunks unread", rawRequestContents.size());
    HttpContent content = rawRequestContents.poll();
    while (content != null) {
      ReferenceCountUtil.release(content);
      content = rawRequestContents.poll();
    }
  }
Wraps the {@code request} in a NettyMultipartRequest so that other layers can understand the request.
@param request the {@link HttpRequest} that needs to be wrapped.
@param channel the {@link Channel} over which the {@code request} has been received.
@param nettyMetrics the {@link NettyMetrics} instance to use.
@param denyListedQueryParams the set of query params that should not be exposed via {@link #getArgs()}.
@param maxSizeAllowedInBytes the cap on the size of the request. If the size of the request goes beyond this size, then
                       it will be discarded.
@throws IllegalArgumentException if {@code request} is null or if the HTTP method defined in {@code request} is
                                   anything other than POST.
@throws RestServiceException if the HTTP method defined in {@code request} is not recognized as a
                               {@link RestMethod}.
ambry-rest/src/main/java/com/github/ambry/rest/NettyMultipartRequest.java