Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- leadGenSubmit() {
- return this.http.get('http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf',
- {responseType:ResponseContentType.Blob}).subscribe((data)=>{
- console.log(data);
- var blob = new Blob([data], {type: 'application/pdf'});
- console.log(blob);
- saveAs(blob, "testData.pdf");
- },
- err=>{
- console.log(err);
- }
- )
- }
- ERROR TypeError: req.responseType.toLowerCase is not a function
- at Observable.eval [as _subscribe] (http.js:2187)
- at Observable._trySubscribe (Observable.js:172)
Add Comment
Please, Sign In to add comment