How can I report a bug with bugzilla rest api? The following document states that the bug object or a some of its fields must be included in POST body. I have tried adding the fields as POST method parameters but i get this error "No data supplied for create" with status code 400. My question is that how can I include a bug object or some of its fields in the POST method body??
https://wiki.mozilla.org/Bugzilla:REST_API:Methods#Create_new_bug_.28.2Fbug_POST.29
String serverURL = "https://api-dev.bugzilla.mozilla.org/test/latest";
String product = "FoodReplicator";
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(serverURL + "/[email protected]&password=123456);
method.addParameter("product", "FoodReplicator");
method.addParameter("component", "Salt");
method.addParameter("summary", "testing");
method.addParameter("version", "1.0");
client.executeMethod(method);
return method.getStatusCode() + " " + method.getResponseBodyAsString();