protected <T extends AbstractBceResponse> T invokeHttpClient(InternalRequest request, Class<T> responseClass) {
        if (!request.getHeaders().containsKey(Headers.CONTENT_TYPE)) {
            request.addHeader(Headers.CONTENT_TYPE, DEFAULT_CONTENT_TYPE);
        }

        if (!request.getHeaders().containsKey(Headers.DATE)) {
            request.addHeader(Headers.DATE, DateUtils.formatRfc822Date(new Date()));
        }

        return this.client.execute(request, responseClass, this.responseHandlers);
    }
protected < T extends AbstractBceResponse > T invokeHttpClient ( InternalRequest request , Class < T > responseClass ) { if ( ! request . getHeaders ( ) . containsKey ( Headers . CONTENT_TYPE ) ) { request . addHeader ( Headers . CONTENT_TYPE , DEFAULT_CONTENT_TYPE ) ; } if ( ! request . getHeaders ( ) . containsKey ( Headers . DATE ) ) { request . addHeader ( Headers . DATE , DateUtils . formatRfc822Date ( new Date ( ) ) ) ; } return this . client . execute ( request , responseClass , this . responseHandlers ) ; }
Subclasses should invoke this method for sending request to the target service.
<p>
This method will add "Content-Type" and "Date" to headers with default values if not present.

@param request the request to build up the HTTP request.
@param responseClass the response class.
@param <T> the type of response
@return the final response object.