title: HTTP PUT Request in angular 2
body: <p>I have been able to deal with all other http methods except PUT method. I have an edit form with which I am able to fetch the already stored data back into the form but after I click the submit button to re-save the edited data, nothing happens. What could be the problem? Below is what i have done.</p>
  
  <p>Edit game form</p>
  
  <pre><code>&lt;form (ngSubmit)="onSubmitForm(e)" #e="ngForm" &gt;
      &lt;div class="form-group"&gt;
          &lt;label for="game_name"&gt;Name of Game&lt;/label&gt;
          &lt;input type="text" class="form-control" id="game_name" [(ngModel)]="eGame.game_name"  &gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="game_type"&gt;Type of Game&lt;/label&gt;
          &lt;input type="text" class="form-control" id="game_type"  [(ngModel)]="eGame.game_type"&gt;
      &lt;/div&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In my component</p>
  
  <pre><code>eGame = {
      game_name:"",  //set default values
      game_type:""
  };
  
  onSubmitForm(game){
      this.httpService.updateGame(game.id)
          .subscribe(
              data =&gt; console.log(data)
          )
  }
  
  
  gameEdit(game){ //function called to fetch data into edit form 
  
      this.eGame = game ;
      console.log(game)
  }
  </code></pre>
  
  <p>Service for my games</p>
  
  <pre><code>updateGame(game){
  
      const body = JSON.stringify(game);
      const headers = new Headers();
      headers.append('Content-Type', 'application/json');
          return this.http.put('url' +game.id, body, headers)
          .map((data:Response) =&gt;data.json())
  }
  </code></pre>