code: public static Response forwardPost(URI uri, HttpServletRequest request, boolean forwardHeaders) throws URISyntaxException, HttpException {
          Header[] headersToForward = null;
          if (request != null && forwardHeaders) {
              headersToForward = HttpUtil.getHeadersFromRequest(request);
          }
  
          String ctString = request.getContentType();
          ContentType ct = ContentType.parse(ctString);
          String body = getRequestBody(request);
  
          return HttpUtil.postBody(new HttpPost(uri), body, ct, null, headersToForward);
      }
docs: Forward POST to uri based on given request
  
  @param uri            uri The URI to forward to.
  @param request        The original {@link HttpServletRequest}
  @param forwardHeaders Should headers of request should be forwarded
  @return
  @throws URISyntaxException
  @throws HttpException