Skip to content

Commit 68840e7

Browse files
committed
Fixes android-async-http#61, allow removing of Basic Auth credentials
1 parent 62903f8 commit 68840e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/src/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,13 @@ public void setBasicAuth(String username, String password, AuthScope scope) {
348348
this.httpClient.getCredentialsProvider().setCredentials(scope, credentials);
349349
}
350350

351+
/**
352+
* Removes set basic auth credentials
353+
* */
354+
public void clearBasicAuth(){
355+
this.httpClient.getCredentialsProvider().clear();
356+
}
357+
351358
/**
352359
* Cancels any pending (or potentially active) requests associated with the
353360
* passed Context.

0 commit comments

Comments
 (0)