import java.net.URI;
+/**
+ * minimal implementation of com.sun.jersey.api.client.ClientResponse
+ *
+ * @author hansonr
+ *
+ */
public class ClientResponse
{
private String response;
- private String encoding;
+ private String[] encoding;
- public ClientResponse(String response, String encoding)
+ public ClientResponse(String response, String... encoding)
{
this.response = response;
this.encoding = encoding;
public int getStatus()
{
// note, we could get the actual response. I am just assuming it is 200 or 400
- return (response != null && (response.startsWith("{") == encoding.equals("application/json"))
+ return (response != null && (response.startsWith("{") == encoding[0].equals("application/json"))
? 200 : 400);
}