title: Passing Typescript "Map" as a part of Angular4 HTTP POST request
body: <p>I have an Angular 4 Project where I am creating a sample Map as follows:</p>
  
  <pre><code>let sampleMap = new Map&lt;string, string&gt;();
  sampleMap.set('key1','value1');
  </code></pre>
  
  <p>Now I am passing this Map as a parameter to a Angular 4 Post method which connects to a Spring Boot Rest backend as follows</p>
  
  <p><strong>Angular 4 Code:</strong></p>
  
  <pre><code>this.http.post('http://localhost:8080/data/posturl', sampleMap).map((response: Response) =&gt; {
        return &lt;string&gt;response.text();
      })
  </code></pre>
  
  <p><strong>Spring Boot Rest Backend Code:</strong></p>
  
  <pre><code>@RequestMapping("/posturl")
  public String launch(@RequestBody Map&lt;String, String&gt; sampleMap) {
      System.out.println("Received=" + sampleMap);
      return "SUCCESS";
  }
  </code></pre>
  
  <p>Although when I try to print the 'sampleMap' as shown above, it print a blank map like follows:</p>
  
  <pre><code>Received={}
  </code></pre>
  
  <p>I am using Typescript version '~2.3.3' and my 'tsconfig.json' mentions target as 'es5'. Can someone please explain this behavior?</p>