title: AJAX reading ETag after a POST request
body: <p>I was wondering, how can I read an ETag that is attached to a server response for a client side POST request that has occured through ajax. At the moment I am POSTing like this from the client side and I get the actual body of the response from the server:</p>
  
  <pre><code>$.ajax({
          type: "POST",
          accepts: "text/plain",
          url: "http://localhost:3000/somewhere",
          data: JSON.stringify(someObject),
          contentType: "application/json; charset=UTF-8", 
          dataType: "text",
          success: function(data) {
              window.alert("Received back: '" + data + "'");
          },
          username: theUsername,
          password: thePassword
      });
  </code></pre>
  
  <p>The server responds to the POST request by setting the headers like this:</p>
  
  <pre><code>res.writeHead (200, {"ETag": "\"" + anETag + "\"", "Content-Type": "text/plain"});
  </code></pre>
  
  <p>Thanks in advance for your time.</p>