title: How to ignore properties sent via http
body: <p>I have an interface in my application that maintains properties that I want to send to my database, as well as properties that I do not.</p>
  
  <p>Specifically I maintain an property called <code>state</code> that can be set to <code>open</code> or <code>null</code> (closed) which then triggers Angular2's Animation <a href="https://angular.io/docs/js/latest/api/core/index/state-function.html" rel="noreferrer">state</a> function. I use this in <code>*ngFor</code> lists to open an close a panel of information about the item.</p>
  
  <p>However, I don't want to store the value of state in my database since it always defaults to <code>null</code>. Currently, I pass the whole object to the http call so the <code>state</code> property gets sent too. How can I instead ignore it?</p>
  
  <pre><code>  pushItemToDay(item: any, dateStr: Date): void {
      let body = JSON.stringify(item);
  
      let headers = new Headers({ 'Content-Type': 'application/json' });
      let options = new RequestOptions({ headers: headers });
  
      this.http.post(this.baseURL + 'api/addItem/' + dateStr, body, options)
          .toPromise()
          .catch(this.handleError);
    }
  </code></pre>