PostMethod method = new PostMethod("
http://brightkite.com/
objects.xml");
method.addParameter("object[place_id]", "A valid place id");
method.addParameter("object[body]", "bla bla");
method.addParameter("object[share_with]", "friends");
String auth = Username+":"+Password;
method.setRequestHeader("Authorization","Basic "+
Base64.encodeBytes(auth.getBytes()).trim());
method.addParameter("http.protocol.expect-continue", "false");
try{
int returnCode = client.executeMethod(method);
System.out.println(returnCode);
BufferedReader br = new BufferedReader(new
InputStreamReader(method.getResponseBodyAsStream()));
String readLine;
while(((readLine = br.readLine()) != null)) {
System.err.println(readLine);
}
}catch(Exception e)
e.printStackTrace();
I get this error
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>
<field>category</field>
<message>You have provided an invalid value for this field!</
message>
</error>
</errors>
Is there a parameter by the name "category" that i am missing? if
there is then what are its valid values?
Please reply.