Here's the code:
Request request = new Request(Method.GET,
"http://localhost:8182/users/dog");
ChallengeResponse authentication = new
ChallengeResponse(ChallengeScheme.HTTP_BASIC, "admin", "admin");
request.setChallengeResponse(authentication);
Client client = new Client(Protocol.HTTP);
Response response = client.handle(request);
String str = (String) response.getEntityAsObject();
System.out.println(str);
Keeps requesting MediaType.TEXT_PLAIN but I'm trying to get an object. I
have the server setup to send object.
if
(variant.getMediaType().equals(MediaType.APPLICATION_JAVA_OBJECT)) {
result = new ObjectRepresentation("Testing....");
System.out.println("\nAPPLICATION_JAVA_OBJECT\n");
}
Where am I going wrong?
--
Justin Stanczak
Stanczak Group
812-735-3600
"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke