title: What is the format of a HTTP PUT request?
body: <p>I am currently working on a simple java program that tests ping, upload speed, and download speed. It is for a class project, and therefore rather than using java's httpURLConnection package, I'm doing it manually using Java Sockets. I found it quite easy to find the format of a GET request, put cannot find the format of a PUT.
  Here, for example, is how my GET request looks:</p>
  
  <pre><code>//Create GET request
  outToServer.writeBytes("GET / HTTP/1.1\r\n
                         + "Host: " + server + "\r\n"
                         + "Connection: close\r\n\r\n");
  </code></pre>
  
  <p>where outToServer is a DataOutputStream using the outputStream of a Socket. I am looking for a similar way to perform a PUT to upload a file to a server and measure the time.
  Thank you very much for any help!</p>