test_class.declarator: httpClient = new HttpClient()
test_class.modifier: private
test_class.original_string: private HttpClient httpClient = new HttpClient();
test_class.type: HttpClient
test_class.var_name: httpClient
test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/util/HttpClientTest.java
test_class.identifier: HttpClientTest
test_class.superclass: extends AbstractEmbeddedServerTest
test_case.body: @Test
  	public void testBasicAuthException() throws Exception {
  		startWithHandler(new AbstractHandler() {
  			@Override
  			public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
  				baseRequest.setHandled(true);
  				response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
  			}
  		});
  
  		final String url = "http://user:pass@localhost:" + getPort() + "/foo?bar=baz";
  		final String urlWithoutAuth = "http://localhost:" + getPort() + "/foo?bar=baz";
  		httpClient.send(HttpRequestBuilder.<Integer>forUrl(url)
  				.successHandler((httpRequest, is, statusCode, e) -> {
  					fail();
  					return null;
  				})
  				.errorHandler((httpRequest, is, statusCode, e) -> {
  					assertThat(statusCode).isEqualTo(401);
  					assertThat(e.getMessage())
  							.doesNotContain(url)
  							.contains(urlWithoutAuth);
  					return null;
  				})
  				.build());
  	}
test_case.class_method_signature: HttpClientTest.testBasicAuthException()
test_case.full_signature: @Test public void testBasicAuthException()
test_case.identifier: testBasicAuthException
test_case.invocations: startWithHandler setHandled sendError getPort getPort send build errorHandler successHandler forUrl fail isEqualTo assertThat contains doesNotContain assertThat getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBasicAuthException()
focal_class.declarator: CONNECT_TIMEOUT_SEC = 5
focal_class.modifier: private static final
focal_class.original_string: private static final long CONNECT_TIMEOUT_SEC = 5;
focal_class.type: long
focal_class.var_name: CONNECT_TIMEOUT_SEC
focal_class.declarator: READ_TIMEOUT_SEC = 15
focal_class.modifier: private static final
focal_class.original_string: private static final long READ_TIMEOUT_SEC = 15;
focal_class.type: long
focal_class.var_name: READ_TIMEOUT_SEC
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/util/HttpClient.java
focal_class.identifier: HttpClient
focal_class.class_method_signature: HttpClient.send(String method, String url, final List<String> requestBodyLines)
focal_class.full_signature: public void send(String method, String url, final List<String> requestBodyLines)
focal_class.identifier: send
focal_class.modifiers: public
focal_class.parameters: (String method, String url, final List<String> requestBodyLines)
focal_class.return: void
focal_class.signature: void send(String method, String url, final List<String> requestBodyLines)
focal_class.class_method_signature: HttpClient.send(final String method, final String url, final Map<String, String> headerFields,
  					  OutputStreamHandler outputStreamHandler, ResponseHandler<T> responseHandler)
focal_class.full_signature: public T send(final String method, final String url, final Map<String, String> headerFields,
  					  OutputStreamHandler outputStreamHandler, ResponseHandler<T> responseHandler)
focal_class.identifier: send
focal_class.modifiers: public
focal_class.parameters: (final String method, final String url, final Map<String, String> headerFields,
  					  OutputStreamHandler outputStreamHandler, ResponseHandler<T> responseHandler)
focal_class.return: T
focal_class.signature: T send(final String method, final String url, final Map<String, String> headerFields,
  					  OutputStreamHandler outputStreamHandler, ResponseHandler<T> responseHandler)
focal_class.class_method_signature: HttpClient.send(final HttpRequest<T> request)
focal_class.full_signature: public T send(final HttpRequest<T> request)
focal_class.identifier: send
focal_class.modifiers: public
focal_class.parameters: (final HttpRequest<T> request)
focal_class.return: T
focal_class.signature: T send(final HttpRequest<T> request)
focal_class.class_method_signature: HttpClient.getResponseCodeIfPossible(HttpURLConnection connection)
focal_class.full_signature: private Integer getResponseCodeIfPossible(HttpURLConnection connection)
focal_class.identifier: getResponseCodeIfPossible
focal_class.modifiers: private
focal_class.parameters: (HttpURLConnection connection)
focal_class.return: Integer
focal_class.signature: Integer getResponseCodeIfPossible(HttpURLConnection connection)
focal_class.class_method_signature: HttpClient.getBasicAuthFromUserInfo(URL url)
focal_class.full_signature: public static String getBasicAuthFromUserInfo(URL url)
focal_class.identifier: getBasicAuthFromUserInfo
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: String
focal_class.signature: String getBasicAuthFromUserInfo(URL url)
focal_class.class_method_signature: HttpClient.removeUserInfo(String url)
focal_class.full_signature: public static String removeUserInfo(String url)
focal_class.identifier: removeUserInfo
focal_class.modifiers: public static
focal_class.parameters: (String url)
focal_class.return: String
focal_class.signature: String removeUserInfo(String url)
focal_method.body: public void send(String method, String url, final List<String> requestBodyLines) {
  		send(HttpRequestBuilder.<Integer>forUrl(url)
  				.method(method)
  				.body(requestBodyLines)
  				.build());
  	}
focal_method.class_method_signature: HttpClient.send(String method, String url, final List<String> requestBodyLines)
focal_method.full_signature: public void send(String method, String url, final List<String> requestBodyLines)
focal_method.identifier: send
focal_method.invocations: send build body method forUrl
focal_method.modifiers: public
focal_method.parameters: (String method, String url, final List<String> requestBodyLines)
focal_method.return: void
focal_method.signature: void send(String method, String url, final List<String> requestBodyLines)