Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

touge.restclient: add constructor for basic auth

  • Loading branch information...
commit e125c6ae0fb54d2aaada3ac7f0cb78fd914e2c09 1 parent bf1fe5e
@kgilmer kgilmer authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 org.touge.restclient/src/org/touge/restclient/ReSTClient.java
View
10 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
Please sign in to comment.
Something went wrong with that request. Please try again.