title: What does 'Content-Type': 'application/x-www-form-urlencoded do in http post method
body: <p>I still don't know how to make a correct http post method in angular 2, I did as they show on their official website. </p>
  
  <p>I have this function createNewPlaylist in my api.service.ts </p>
  
  <pre><code>    createNewPlaylist(stDate: string, etDate: string, playlistTitle: string, shortTitle: string): Observable&lt;any&gt; {
  
   /**some code here **//
  let headers = new Headers({ 'Content-Type': 'application/json' });
  let options = new RequestOptions({ headers: headers });
  
          return this.http.post(`https://cmsapi-dev.b2c.on.aol.com/v1.0/cms/playlists/${this.g_app}/${this.g_region}?trustedUserId=myuserid`,
               JSON.stringify({
                name: playlistTitle,
               shortName: shortTitle,
             }), options);
      }
  </code></pre>
  
  <p>And I have this function in my component</p>
  
  <pre><code>createNewPlaylist(stDate: string, etDate: string, playlistTitle: string, shortTitle: string):any {
      this.apiService.createNewPlaylist(stDate, etDate, playlistTitle, shortTitle)
      .map(res =&gt; console.log(res))
      .subscribe(
        data =&gt; console.log(data),
        error =&gt; console.log(error)
      );
  </code></pre>
  
  <p>If i use the browser, enter the url directly (<a href="https://mydomain/v1.0/cms/playlists/aolon/us?name=asd&amp;shortName=lalalal&amp;method=POST&amp;trustedUserId=myuserid" rel="nofollow noreferrer">https://mydomain/v1.0/cms/playlists/aolon/us?name=asd&amp;shortName=lalalal&amp;method=POST&amp;trustedUserId=myuserid</a>), it will generate correct respond.</p>
  
  <p><a href="https://i.stack.imgur.com/HjogG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HjogG.png" alt="enter image description here"></a></p>
  
  <p>But my console get an error when I do it normally,</p>
  
  <p>{"response":{"statusCode":478,"statusText":"Bad argument - name"}}</p>
  
  <p><a href="https://i.stack.imgur.com/UrIRb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UrIRb.png" alt="enter image description here"></a>
  Any ideas?</p>
  
  <p><strong>Update: I changed my code to this and it works, can someone explain to me?</strong></p>
  
  <pre><code>  let headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' });
      let options = new RequestOptions({ headers: headers });
  
  
     return this.http.post(`https://cmsapi-dev.b2c.on.aol.com/v1.0/cms/playlists/${this.g_app}/${this.g_region}/?trustedUserId=myuserid`,
       `name=${playlistTitle}&amp;shortTitle=${shortTitle}`,  options )
  </code></pre>