@Override
      public void handle(Request request, HttpServletResponse response) {
        String auth = request.getHeader("Authorization");
        auth = auth.substring(auth.indexOf(' ') + 1);
        try {
          auth = B64Code.decode(auth, CHARSET_UTF8);
        } catch (UnsupportedEncodingException e) {
          throw new RuntimeException(e);
        }
        int colon = auth.indexOf(':');
        user.set(auth.substring(0, colon));
        password.set(auth.substring(colon + 1));
        response.setStatus(HTTP_OK);
      }
Make a GET request with basic authentication specified

@throws Exception
lib/src/test/java/com/github/kevinsawicki/http/HttpRequestTest.java