title: How to post a bug using Bugzilla REST API
body: <p>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??</p>
  
  <p><a href="https://wiki.mozilla.org/Bugzilla:REST_API:Methods#Create_new_bug_.28.2Fbug_POST.29" rel="nofollow noreferrer">https://wiki.mozilla.org/Bugzilla:REST_API:Methods#Create_new_bug_.28.2Fbug_POST.29</a></p>
  
  <pre><code>String serverURL = "https://api-dev.bugzilla.mozilla.org/test/latest";
          String product = "FoodReplicator";            
          HttpClient client = new HttpClient();
          PostMethod method = new PostMethod(serverURL + "/bug?username=abc@xyz.com&amp;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();
  </code></pre>