resteasy/Resteasy — pull request #85 by zyc (2012-05-11 17:35:58+00:00)
Title: Branch 2 3

Fixing the unchecked warnings and allowing child classes to modify the behavior of the setupRequest method, for example:

public class MyClientExecutor extends URLConnectionClientExecutor {

@Override
protected void setupRequest(ClientRequest request, HttpURLConnection connection) throws ProtocolException {

String username = "myusername";
String password = "mypassword";

String authString = username + ":" + password;
String authStringBase64 = Base64.encodeBytes(authString.getBytes());

connection.addRequestProperty("Authorization", "Basic " + authStringBase64);

super.setupRequest(request, connection);
}
}

It is very useful ;)