Permalink
Browse files

touge.restclient: add constructor for basic auth

  • Loading branch information...
kgilmer committed Nov 18, 2011
1 parent bf1fe5e commit e125c6ae0fb54d2aaada3ac7f0cb78fd914e2c09
Showing with 10 additions and 0 deletions.
  1. +10 −0 org.touge.restclient/src/org/touge/restclient/ReSTClient.java
@@ -443,6 +443,16 @@ public ReSTClient(ConnectionInitializer initializer) {
this();
connectionInitializers.add(initializer);
}
+
+ /**
+ * Creates a ReSTClient with basic authentication credentials.
+ * @param username
+ * @param password
+ */
+ public ReSTClient(String username, String password) {
+ this();
+ connectionInitializers.add(new BasicAuthConnectionInitializer(username, password));
+ }
/**
* @param connectionProvider ConnectionProvider

0 comments on commit e125c6a

Please sign in to comment.