Guest User

Untitled

a guest
Apr 26th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. leadGenSubmit() {
  2.  
  3. return this.http.get('http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf',
  4. {responseType:ResponseContentType.Blob}).subscribe((data)=>{
  5. console.log(data);
  6. var blob = new Blob([data], {type: 'application/pdf'});
  7. console.log(blob);
  8. saveAs(blob, "testData.pdf");
  9. },
  10. err=>{
  11. console.log(err);
  12. }
  13. )
  14. }
  15.  
  16. ERROR TypeError: req.responseType.toLowerCase is not a function
  17. at Observable.eval [as _subscribe] (http.js:2187)
  18. at Observable._trySubscribe (Observable.js:172)
Add Comment
Please, Sign In to add comment