title: REST how to handle query parameters when put to resource?
body: <p>I have a REST data service where I want to allow the users to create new items with HTTP PUT using different formats like json,xml,csv. I'm unsure how to best handle the format specification in the url:</p>
  
  <pre><code>PUT /ressource/ID/json
  PUT /ressource/ID/xml
  </code></pre>
  
  <p>or</p>
  
  <pre><code>PUT /ressource/ID?format=json
  PUT /ressource/ID?format=xml
  </code></pre>
  
  <p>So what is the best way to specify a format indicator? </p>
  
  <p>If I specify the format with an query parameter and want to do a <code>PUT</code> how can I do this with curl?</p>
  
  <pre><code>curl -T test/data.json -d "format=json"  http://localhost:5000/resource/33
  </code></pre>
  
  <p>does not work. </p>
  
  <pre><code>curl -T test/data.json http://localhost:5000/update?format=json
  </code></pre>
  
  <p>works, but I would rather let curl build the query parameters instead of adding them by myself.</p>