Hi, I am trying to get BasicAuthSecurityHandler working with the Apache
Wink client using the following code but it does not seem to work:

        ClientConfig config = new ClientConfig();
        BasicAuthSecurityHandler auth = new BasicAuthSecurityHandler();
        auth.setUserName("username");
        auth.setPassword("password");
        config.handlers(auth);
        RestClient client = new RestClient(config);
        Resource resource = client.resource("http://requestb.in/19qKpb1";);
        ClientResponse response =
resource.contentType(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).get();

After sending this to requestbin to see what is being sent, no
Authorization headers seem to be sent.  Am I missing something?

  - Erich

Reply via email to