我有返回PDF文件的API,但是当我调用它时,它会给出这个错误。Http failure during parsing for http://localhost:1234/hebaback/public/api/download-report-20
error: SyntaxError: Unexpected token % in JSON at position 0 at JSON.parse (<an
我正在尝试执行一个从本地目录获取文件的http.get请求,此时我只想console.log api get被请求的响应。getFile()显示了console.log,但调用了http,不确定http在angular2中是如何使用的;我知道在angular1中它使用.then作为响应。import { Http, HTTP_PROVIDERS } from