Adding documentation for snippets
@@ -268,6 +268,7 @@ protected BrowseService getBrowseService( String authzHeader, boolean useXml )
{
WebClient.client( service ).header( "Authorization", authzHeader );
}
+ // Set the Referer header to your archiva server url
WebClient.client(service).header("Referer","http://localhost:"+port);
WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 100000000 );
@@ -298,6 +299,7 @@ protected SearchService getSearchService( String authzHeader )
{
WebClient.client( service ).header( "Authorization", authzHeader );
}
+ // Set the Referer header to your archiva server url
WebClient.client(service).header("Referer","http://localhost:"+port);
// to configure read timeout
WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 100000000 );
