title: Format of an HTTP get request
body: <p>I'm writing an HTTP server (for the sole purpose of educating myself).</p>
  
  <p>A typical GET request seems to be this:</p>
  
  <pre><code>GET /?a=1&amp;b=2 HTTP/1.1 
  Host: localhost    
  User-Agent: my browser details
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8    
  Accept-Language: en-gb,en;q=0.5    
  Accept-Encoding: gzip, deflate    
  Connection: keep-alive
  </code></pre>
  
  <p>The only place I can see the variables being sent is in the first line.
  It would be easy enough to write a regex to get the variables and their contents, but I'm wondering if there is an easier way. I ask because I always assumed that the idea of <code>url?first_variable=first_value&amp;second_variable=second_value</code> was part of the protocol, and special in some way. However, as far as I can see, this isn't the case, and I could equally just do <code>url$first_variable-first_value?second_variable-second_value</code> or something.</p>