<commit_before>import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import 'rxjs/add/observable/throw';
import { Observable } from 'rxjs/Observable';

@Injectable()
export class HeaderService {

    constructor(private http: HttpClient) { }

    logout(): Observable<any> {
        const headers = new HttpHeaders().set('Content-Type', 'application/json; charset=utf-8');
        return this.http.get(`/api/logout`, { headers })
                        .catch(error => Observable.throw(error));<commit_msg>clear local  storage on logout<commit_after>import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import 'rxjs/add/observable/throw';
import { Observable } from 'rxjs/Observable';

@Injectable()
export class HeaderService {

    constructor(private http: HttpClient) { }

    logout(): Observable<any> {
        localStorage.clear();
        const headers = new HttpHeaders().set('Content-Type', 'application/json; charset=utf-8');
        return this.http.get(`/api/authentication/logout`, { headers })
                        .catch(error => Observable.throw(error));
{'fraction_non_alphanumeric': 0.14817629179331307, 'fraction_numerical': 0.001519756838905775, 'mean_word_length': 3.895910780669145, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6946427', 'n_tokens_mistral': 381, 'n_tokens_neox': 374, 'n_words': 82}