public Builder setHardCancellationEnabled(final boolean hardCancellationEnabled) {
            this.hardCancellationEnabled = hardCancellationEnabled;
            return this;
        }
Determines whether request cancellation, such as through {@code
Future#cancel(boolean)}, should kill the underlying connection. If this
option is set to false, the client will attempt to preserve the
underlying connection by allowing the request to complete in the
background, discarding the response.
<p>
Note that when this option is {@code true}, cancelling a request may
cause other requests to fail, if they are waiting to use the same
connection.
</p>
<p>
On HTTP/2, this option has no effect. Request cancellation will always
result in the stream being cancelled with a {@code RST_STREAM}. This
has no effect on connection reuse.
</p>
<p>
On non-asynchronous clients, this option has no effect. Request
cancellation, such as through {@code HttpUriRequestBase#cancel()}, will
always kill the underlying connection.
</p>
<p>
Default: {@code true}
</p>

@return this instance.
@since 5.0
httpclient5/src/main/java/org/apache/hc/client5/http/config/RequestConfig.java