title: Reactive Forms - Appending Values in Angular
body: <p>I am working with a reactive form and I am able to append some values from it in order to send an <code>http</code> request make a post. It works when I append text or a file, but I am not sure how to append a date or a boolean or an array.</p>
  
  <pre><code>addPost(postAdded: Post, image: File) {
      const postData = new FormData();
      postData.append("title", postAdded.title); // string
      postAdded.append("startDate", postAdded.startDate); // date
      postAdded.append("private", postAdded.private); // boolean
      postAdded.append("image", image, postAdded.title); // file
      this.http
        .post&lt;{ postId: string }&gt;(
          "http://localhost:3000/api/posts",
          postAdded
        )
        .subscribe(responseData =&gt; {
          this.potsUpdated.next([...this.posts]);
          this.router.navigate(["/"]);
        });
    }
  </code></pre>
  
  <p>The error I get is the following:</p>
  
  <blockquote>
    <p>Argument of type 'Date' is not assignable to parameter of type 'string | Blob'.
      Type 'Date' is not assignable to type 'string'.ts(2345)</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>Argument of type 'boolean' is not assignable to parameter of type 'string | Blob'.ts(2345) </p>
  </blockquote>
  
  <p>and finally the error for array</p>
  
  <blockquote>
    <p>Argument of type 'string[]' is not assignable to parameter of type 'string | Blob'.
      Type 'string[]' is not assignable to type 'string'.ts(2345)</p>
  </blockquote>
  
  <p>When using a boolean</p>
  
  <p>The booleans are for toggles, dates for datepickers.</p>
  
  <p>How could I do it?</p>