openaire-library/landingPages/htmlProjectReport/htmlProjectReport.service.ts

18 lines
548 B
TypeScript
Raw Normal View History

import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
@Injectable()
export class HtmlProjectReportService {
constructor(private http: HttpClient ) {}
getHTML(id: string, requestType:string, csvAPIURL: string ):any {
let url = csvAPIURL;
url += '?format=html&type='+requestType+'&fq=(' +
//'((oaftype exact result) and (resulttypeid exact "'+resultTypeId+'")) and
'(relprojectid exact "'+id+'"))';
return this.http.get(url,{responseType: 'text'});
}
}