private InternalRequest createRequest ( AbstractBceRequest bceRequest , HttpMethodName httpMethod , String ... pathVariables ) { List < String > path = new ArrayList < String > ( ) ; path . add ( VERSION ) ; if ( pathVariables != null ) { for ( String pathVariable : pathVariables ) { path . add ( pathVariable ) ; } } URI uri = HttpUtils . appendUri ( this . getEndpoint ( ) , path . toArray ( new String [ path . size ( ) ] ) ) ; InternalRequest request = new InternalRequest ( httpMethod , uri ) ; SignOptions signOptions = new SignOptions ( ) ; signOptions . setHeadersToSign ( new HashSet < String > ( Arrays . asList ( HEADERS_TO_SIGN ) ) ) ; request . setSignOptions ( signOptions ) ; request . setCredentials ( bceRequest . getRequestCredentials ( ) ) ; return request ; }
Creates and initializes a new request object for the specified resource .