private WebTarget configure ( String token , boolean debug , Logger log , int maxLog ) { Client client = ClientBuilder . newBuilder ( ) . register ( MultiPartFeature . class ) . register ( JsonProcessingFeature . class ) . build ( ) ; client . register ( HttpAuthenticationFeature . basic ( token , "" ) ) ; if ( debug ) client . register ( new LoggingFilter ( log , maxLog ) ) ; return client . target ( baseUri ) ; }
Configures this client by settings HTTP AUTH filter the REST URL and logging .