title: how to sent array data as formdata angular 4
body: <p>I tried to post an array of data is not sending to server:</p>
  
  <p>webservice: </p>
  
  <pre><code> deleteCategory() {
      return  this.http.post('http://www.demo/webapi/deletecategory', { 
          headers: {
            "Authorization": "Token " + this.token,
            "Content-Type": "application/x-www-form-urlencoded"
          },
          withCredentials: true
        }
        )
      }
  </code></pre>
  
  <p>in ts file </p>
  
  <pre><code>onDelete() {
        this.userService.deleteCategory().subscribe(response =&gt; {
        this.selectedArray = [];
       for (var i = 0; i&lt; this.selection._selected.length; i++){
       this.selectedArray.push(this.selection._selected[i].category_id) ;
       console.log(' selected value:', this.selectedArray);
  
       }
      })
        }
  </code></pre>
  
  <p>in html </p>
  
  <pre><code>&lt;button class="btn-danger pull-right" (click)="onDelete()" type="button"  &gt;Delete&lt;/button&gt;
  </code></pre>