File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
src/test/java/org/baeldung/httpclient/sec Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
88### Relevant Articles:
99
1010- [ HttpClient 4 – Get the Status Code] ( http://www.baeldung.com/httpclient-status-code )
11- - [ HttpClient with SSL] ( http://www.baeldung.com/httpclient-ssl )
11+ - [ HttpClient with SSL] ( http://www.baeldung.com/httpclient-ssl )
12+ - [ HttpClient Basic Authentication] ( http://www.baeldung.com/httpclient-4-basic-authentication )
Original file line number Diff line number Diff line change 2323import org .junit .Test ;
2424
2525import java .io .IOException ;
26- import java .nio .charset .Charset ;
2726import java .nio .charset .StandardCharsets ;
2827
2928import static org .hamcrest .Matchers .equalTo ;
3029import static org .junit .Assert .assertThat ;
3130
3231/*
33- * NOTE : Need module spring-security-rest-basic-auth to be running
32+ * NOTE : Need module httpclient-simple to be running
3433 */
3534
3635public class HttpClientAuthLiveTest {
3736
38- private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://localhost:8081/spring-security-rest-basic-auth /api/foos/1" ;
37+ private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://localhost:8082/httpclient-simple /api/foos/1" ;
3938 private static final String DEFAULT_USER = "user1" ;
4039 private static final String DEFAULT_PASS = "user1Pass" ;
4140
@@ -111,7 +110,7 @@ private CredentialsProvider provider() {
111110 }
112111
113112 private HttpContext context () {
114- final HttpHost targetHost = new HttpHost ("localhost" , 8080 , "http" );
113+ final HttpHost targetHost = new HttpHost ("localhost" , 8082 , "http" );
115114 final CredentialsProvider credsProvider = new BasicCredentialsProvider ();
116115 credsProvider .setCredentials (AuthScope .ANY , new UsernamePasswordCredentials (DEFAULT_USER , DEFAULT_PASS ));
117116
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
1313- [ Unshorten URLs with HttpClient] ( http://www.baeldung.com/unshorten-url-httpclient )
1414- [ HttpClient 4 – Follow Redirects for POST] ( http://www.baeldung.com/httpclient-redirect-on-http-post )
1515- [ Custom HTTP Header with the HttpClient] ( http://www.baeldung.com/httpclient-custom-http-header )
16- - [ HttpClient Basic Authentication] ( http://www.baeldung.com/httpclient-4-basic-authentication )
1716- [ Multipart Upload with HttpClient 4] ( http://www.baeldung.com/httpclient-multipart-upload )
1817- [ HttpAsyncClient Tutorial] ( http://www.baeldung.com/httpasyncclient-tutorial )
1918- [ HttpClient 4 Tutorial] ( http://www.baeldung.com/httpclient-guide )
You can’t perform that action at this time.
0 commit comments