Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this._printService.GetWord(printInfo).subscribe((response:any) => {
- const filename = response.headers.get('Content-Disposition').split(/[;'=]/).pop();
- saveAs(response.body, decodeURIComponent(filename))
- });
- GetWord(params: HttpParams): Observable<any> {
- return this.http.get<Blob>(
- `${this.apiUrl}/DemoWordGet`,
- {
- params,
- responseType: 'blob' as 'json',
- observe: 'response',
- });
- }
- return this.http
- .get(`${this.apiUrl}/DemoWordGet`, {
- responseType: ResponseContentType.Blob
- })
- .map(res => {
- return {
- filename: 'filename.pdf',
- data: res.blob()
- };
- });
- responseType: 'blob' as 'json'
- responseType: "blob"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement