@Test public void testBasicAuth() throws Exception { final boolean[] handled = {false}; startWithHandler(new AbstractHandler() { @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { baseRequest.setHandled(true); assertEquals("Basic dXNlcjpwYXNz", request.getHeader("Authorization")); assertThat(request.getQueryString()).isEqualTo("bar=baz"); handled[0] = true; } }); assertEquals(Integer.valueOf(200), httpClient.send(HttpRequestBuilder.<Integer>forUrl("http: .successHandler(new StatusCodeResponseHandler()).build())); assertTrue(handled[0]); }
public void send(String method, String url, final List<String> requestBodyLines) { send(HttpRequestBuilder.<Integer>forUrl(url) .method(method) .body(requestBodyLines) .build()); }
HttpClient { public void send(String method, String url, final List<String> requestBodyLines) { send(HttpRequestBuilder.<Integer>forUrl(url) .method(method) .body(requestBodyLines) .build()); } }
HttpClient { public void send(String method, String url, final List<String> requestBodyLines) { send(HttpRequestBuilder.<Integer>forUrl(url) .method(method) .body(requestBodyLines) .build()); }  }
HttpClient { public void send(String method, String url, final List<String> requestBodyLines) { send(HttpRequestBuilder.<Integer>forUrl(url) .method(method) .body(requestBodyLines) .build()); }  void send(String method, String url, final List<String> requestBodyLines); T send(final String method, final String url, final Map<String, String> headerFields,
					  OutputStreamHandler outputStreamHandler, ResponseHandler<T> responseHandler); T send(final HttpRequest<T> request); static String getBasicAuthFromUserInfo(URL url); static String removeUserInfo(String url); }
HttpClient { public void send(String method, String url, final List<String> requestBodyLines) { send(HttpRequestBuilder.<Integer>forUrl(url) .method(method) .body(requestBodyLines) .build()); }  void send(String method, String url, final List<String> requestBodyLines); T send(final String method, final String url, final Map<String, String> headerFields,
					  OutputStreamHandler outputStreamHandler, ResponseHandler<T> responseHandler); T send(final HttpRequest<T> request); static String getBasicAuthFromUserInfo(URL url); static String removeUserInfo(String url);  }