proactive-http-fetch
Version:
Proactive http fetch package
12 lines (10 loc) • 415 B
text/typescript
export class AntiforgeryService {
private storedHeaderValue: string = '';
get headerName(): string { return 'RequestVerificationToken'; };
get headerValue(): string { return this.storedHeaderValue; };
public storeAntiforgery(response: Response): void {
if (!!this.storedHeaderValue)
return;
this.storedHeaderValue = response.headers[this.headerName];
}
}