<commit_before>import { Injectable }     from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Rx';

// Import RxJs required methods
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';

@Injectable()
export class ValeursService {

  // Resolve HTTP using the constructor
  constructor (private http: Http) {}

  getData(): Observable<string> {
    return this.http.get(this.getServerUrl() + '/test')
      .map(this.extractData)
      .catch(this.handleError);
  }

  getServerUrl(): string {
    return 'http://' + window.location.hostname + ':3003';
  }

  private extractData(res: Response) {
    return res.text();<commit_msg>appel au server : https<commit_after>import { Injectable }     from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Rx';

// Import RxJs required methods
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';

@Injectable()
export class ValeursService {

  // Resolve HTTP using the constructor
  constructor (private http: Http) {}

  getData(): Observable<string> {
    return this.http.get(this.getServerUrl() + '/test')
      .map(this.extractData)
      .catch(this.handleError);
  }

  getServerUrl(): string {
    return 'https://' + window.location.hostname + ':3003';
  }

  private extractData(res: Response) {
    return res.text();
{'fraction_non_alphanumeric': 0.14443676572218384, 'fraction_numerical': 0.0055286800276434, 'mean_word_length': 3.9084745762711863, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '5430921', 'n_tokens_mistral': 454, 'n_tokens_neox': 439, 'n_words': 110}