in juneau-petstore-client/src/main/java/org/apache/juneau/petstore/Main.java [37:53]
public static void main(String[] args) throws ParseException, IOException {
RestClient restClient = RestClient.create().simpleJson().basicAuth("localhost", 5000, "admin", "password").build();
// Instantiate our proxy.
PetStore petStore = restClient.getRemote(PetStore.class, "http://localhost:5000");
// Print out the pets in the store.
Collection<Pet> pets = petStore.getPets();
// Pretty-print them to SYSOUT.
SimpleJson.DEFAULT_READABLE.println(pets);
// Initialize the application through REST calls.
init(new PrintWriter(System.out), petStore);
}