2011-01-15 2 views

답변

0

또한 Jersey-Client을 사용할 수 있습니다, 그것은 호환 GAE와 HttpClient를보다 쉽게 ​​:

WebResource resource = Client.create().resource("http/../uri"); 
resource.addFilter(new HTTPDigestAuthFilter(login, password)); 
ClientResponse response = resource.get(ClientResponse.class); 

assertTrue(response.getStatus() == 200); 
assertNotNull(response.getEntity(String.class));