title: Converting cURL authentication to Java and retrieving & updating data using REST XML (Pt.2)
body: <p>This is the second part of my question on converting cURL to Java
  The first part is titled:</p>
  
  <blockquote>
    <p><em>Converting cURL authentication to Java and retrieving &amp; updating data using REST XML (Pt.1)</em></p>
  </blockquote>
  
  <p><strong>Third</strong>, how can I implement update, create, and delete for the api in Java? For example:</p>
  
  <ol>
  <li>Update: <code>curl -i -X PUT -H "Content-Type:application/xml" -H "Accept: application/xml" -d "&lt;ticket&gt;&lt;description&gt;Take this description&lt;/description&gt;&lt;/ticket&gt;" <a href="http://user:password@www.assembla.com/spaces/my" rel="nofollow">http://user:password@www.assembla.com/spaces/my</a>_space_id/tickets/1</code></li>
  <li>Delete" <code>curl -i -X DELETE -H "Accept: application/xml" <a href="http://user:password@www.assembla.com/spaces/my" rel="nofollow">http://user:password@www.assembla.com/spaces/my</a>_space_id/tickets/1</code></li>
  <li>Create: <code>curl -i -X POST -H "Content-Type:application/xml" -H "Accept: application/xml" -d "&lt;ticket&gt;&lt;summary&gt;This is a Summary&lt;/summary&gt;&lt;priority&gt;3&lt;/priority&gt;&lt;/ticket&gt;" the weblink</code>  </li>
  </ol>
  
  <p>In other words, how can I convert these cURL code into Java?</p>
  
  <p>I would really appreciate your help. Also, a good reference to do such stuff in Java will be awesome too.</p>
  
  <p>Thanks.</p>