@@ -634,10 +634,10 @@ public void setBasicAuth(String username, String password) {
634
634
*
635
635
* @param username Basic Auth username
636
636
* @param password Basic Auth password
637
- * @param preemtive sets authorization in preemtive manner
637
+ * @param preemptive sets authorization in preemptive manner
638
638
*/
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 );
641
641
}
642
642
643
643
/**
@@ -659,12 +659,12 @@ public void setBasicAuth(String username, String password, AuthScope scope) {
659
659
* @param username Basic Auth username
660
660
* @param password Basic Auth password
661
661
* @param scope an AuthScope object
662
- * @param preemtive sets authorization in preemtive manner
662
+ * @param preemptive sets authorization in preemptive manner
663
663
*/
664
- public void setBasicAuth (String username , String password , AuthScope scope , boolean preemtive ) {
664
+ public void setBasicAuth (String username , String password , AuthScope scope , boolean preemptive ) {
665
665
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials (username , password );
666
666
setCredentials (scope , credentials );
667
- setAuthenticationPreemptive (preemtive );
667
+ setAuthenticationPreemptive (preemptive );
668
668
}
669
669
670
670
public void setCredentials (AuthScope authScope , Credentials credentials ) {
@@ -676,16 +676,16 @@ public void setCredentials(AuthScope authScope, Credentials credentials) {
676
676
}
677
677
678
678
/**
679
- * Sets HttpRequestInterceptor which handles authorization in preemtive way, as workaround you
679
+ * Sets HttpRequestInterceptor which handles authorization in preemptive way, as workaround you
680
680
* can use call `AsyncHttpClient.addHeader("Authorization","Basic base64OfUsernameAndPassword==")`
681
681
*
682
- * @param isPreemtive whether the authorization is processed in preemtive way
682
+ * @param isPreemptive whether the authorization is processed in preemptive way
683
683
*/
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 );
687
687
} else {
688
- httpClient .removeRequestInterceptorByClass (PreemtiveAuthorizationHttpRequestInterceptor .class );
688
+ httpClient .removeRequestInterceptorByClass (PreemptiveAuthorizationHttpRequestInterceptor .class );
689
689
}
690
690
}
691
691
0 commit comments