title: Angular 2 http POST
body: <p>I start work with angular 2  and typeScript , all work great, but when i work with rest api (POST) in console log i get <code>Response {_body: &quot;&quot;, status: 204, statusText: &quot;Ok&quot;, headers: Headers, type: 2… }</code> , despite i passed the true param for login this is my code</p>
  <pre><code> authentification(){
          var headers = new Headers();
            headers.append('Content-Type', 'application/x-www-form-urlencoded');
          // headers.append('Content-Type', 'application/json');
         return this.http.post(this._postUrl,JSON.stringify({username:&quot;abc&quot;,password:&quot;abc&quot;}),{headers:headers});
      }
  </code></pre>
  <p>and this is my web service</p>
  <pre><code> @POST
      @Path(&quot;/admin&quot;)
      @Consumes(&quot;application/x-www-form-urlencoded&quot;)
      public User getDate(@HeaderParam(&quot;username&quot;)String username,@HeaderParam(&quot;password&quot;)String password) throws Exception{
          try {
              String passwordC =  AESCrypt.encrypt(password);
              User u = userService.login(username, passwordC);
              return u;
              
          } catch (Exception e) {
              return null;
          }
      }
  </code></pre>
  <p>i think problem in my web service param in string and in angular param is json<br />
  any one can help me please and thanks.</p>