Skip to content

Commit e26d725

Browse files
committed
correct typo preemtive to preemptive
1 parent e8615d0 commit e26d725

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,10 @@ public void setBasicAuth(String username, String password) {
634634
*
635635
* @param username Basic Auth username
636636
* @param password Basic Auth password
637-
* @param preemtive sets authorization in preemtive manner
637+
* @param preemptive sets authorization in preemptive manner
638638
*/
639-
public void setBasicAuth(String username, String password, boolean preemtive) {
640-
setBasicAuth(username, password, null, preemtive);
639+
public void setBasicAuth(String username, String password, boolean preemptive) {
640+
setBasicAuth(username, password, null, preemptive);
641641
}
642642

643643
/**
@@ -659,12 +659,12 @@ public void setBasicAuth(String username, String password, AuthScope scope) {
659659
* @param username Basic Auth username
660660
* @param password Basic Auth password
661661
* @param scope an AuthScope object
662-
* @param preemtive sets authorization in preemtive manner
662+
* @param preemptive sets authorization in preemptive manner
663663
*/
664-
public void setBasicAuth(String username, String password, AuthScope scope, boolean preemtive) {
664+
public void setBasicAuth(String username, String password, AuthScope scope, boolean preemptive) {
665665
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(username, password);
666666
setCredentials(scope, credentials);
667-
setAuthenticationPreemptive(preemtive);
667+
setAuthenticationPreemptive(preemptive);
668668
}
669669

670670
public void setCredentials(AuthScope authScope, Credentials credentials) {
@@ -676,16 +676,16 @@ public void setCredentials(AuthScope authScope, Credentials credentials) {
676676
}
677677

678678
/**
679-
* Sets HttpRequestInterceptor which handles authorization in preemtive way, as workaround you
679+
* Sets HttpRequestInterceptor which handles authorization in preemptive way, as workaround you
680680
* can use call `AsyncHttpClient.addHeader("Authorization","Basic base64OfUsernameAndPassword==")`
681681
*
682-
* @param isPreemtive whether the authorization is processed in preemtive way
682+
* @param isPreemptive whether the authorization is processed in preemptive way
683683
*/
684-
public void setAuthenticationPreemptive(boolean isPreemtive) {
685-
if (isPreemtive) {
686-
httpClient.addRequestInterceptor(new PreemtiveAuthorizationHttpRequestInterceptor(), 0);
684+
public void setAuthenticationPreemptive(boolean isPreemptive) {
685+
if (isPreemptive) {
686+
httpClient.addRequestInterceptor(new PreemptiveAuthorizationHttpRequestInterceptor(), 0);
687687
} else {
688-
httpClient.removeRequestInterceptorByClass(PreemtiveAuthorizationHttpRequestInterceptor.class);
688+
httpClient.removeRequestInterceptorByClass(PreemptiveAuthorizationHttpRequestInterceptor.class);
689689
}
690690
}
691691

library/src/main/java/com/loopj/android/http/PreemtiveAuthorizationHttpRequestInterceptor.java renamed to library/src/main/java/com/loopj/android/http/PreemptiveAuthorizationHttpRequestInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
import java.io.IOException;
3535

36-
public class PreemtiveAuthorizationHttpRequestInterceptor implements HttpRequestInterceptor {
36+
public class PreemptiveAuthorizationHttpRequestInterceptor implements HttpRequestInterceptor {
3737

3838
public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
3939
AuthState authState = (AuthState) context.getAttribute(ClientContext.TARGET_AUTH_STATE);

0 commit comments

Comments
 (0)