title: How can i send a CSRF Token
body: <p>I am trying to sending login details but response error is 
  showing csrf token is missing. How can i send a csrf token from angular 2<br>
  to backend Django.</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient, HttpHeaders} from '@angular/common/http';
  import { Observable } from 'rxjs/Observable';
  import { Cookie } from 'ng2-cookies'; 
  import  'rxjs/add/operator/map';
  
  @Injectable()
  export class AuthenticationService {
      constructor(private http: HttpClient){}
  
      login(username:string,password:string){
          return this.http.post&lt;any&gt;('/api/auth',{username:username,password:password},)
              .map(user =&gt; {
                  //login successful if there a jwt token in the response
                  if(user &amp;&amp; user.token){
                      localStorage.setItem('currentUser',JSON.stringify(user));
                  }
                  return user;
              })
      }
  
      logout(){
          //remove user from local storage to log user out 
          localStorage.removeItem('CurrentUser');
      }
  }
  </code></pre>