@Override
                    public void failed(final Exception ex) {
                        System.out.println(request + "->" + ex);
                    }
This example demonstrates how to use a custom execution interceptor
to add trailers to all outgoing request enclosing an entity.
httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java