title: Should I check the status when doing HTTP POST or PUT requests with XHR?
body: <p>This is a weird question I got after watching some videos about XHR and Async JS from an Udemy Course. There was a section where we create a simple library for making HTTP Requests in ES5. It started like this:</p>
  <pre><code>function EasyHTTP() {
    this.http = new XMLHttpRequest;
  }
  
  // Make an HTTP GET Request
  EasyHTTP.prototype.get = function(url, callback) {
    this.http.open('GET', url, true);
  
    let self = this;
    this.http.onload = function() {
      if (self.http.status === 200) {
        callback(null, self.http.responseText)
      } else {
        callback('Error: ' + self.http.status)
      }
    }
  
    this.http.send();
  }
  </code></pre>
  <p>I understood everything. But when the instructor was writing the <code>post</code> method, he did almost the same as in <code>get</code> method but said &quot;We don't need to check the status, because we're doing a POST request&quot; and the final method for POST ended up like this:</p>
  <pre><code>// Make an HTTP POST Request
  EasyHTTP.prototype.post = function(url, data, callback) {
    this.http.open('POST', url, true);
    this.http.setRequestHeader('Content-type', 'application/json');
  
    let self = this;
    this.http.onload = function() {
      callback(null, self.http.responseText)
    }
  
    this.http.send(JSON.stringify(data));
  }
  </code></pre>
  <p>And he did the same for the <code>put</code> method. But for the <code>delete</code> he checked the status like in the <code>get</code> method.  I am confused, should we really &quot;ignore&quot; the status when doing POST and PUT requests? Why?</p>