This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

HttpXsrfTokenExtractor

npm Package @angular/common
Module import { HttpXsrfTokenExtractor } from '@angular/common/http';
Source common/http/src/xsrf.ts

Overview

      
      class HttpXsrfTokenExtractor {
  getToken(): string | null
}
    

Description

Retrieves the current XSRF token to use with the next outgoing request.

Members

      
      getToken(): string | null
    

Get the XSRF token to use with an outgoing request.

Will be called for every request, so the token may change between requests.