我有以下代码:
{
"timestamp": "2018-08-13T19:18:47.246+0000",
"status": 415,
"error": "Unsupported Media Type",
"message": "Content type 'multipart/form-data;boundary=--------------------------175574471409780768513459;charset=UTF-8' not supported",
"path": "/alian"
}
要获得该值我需要打印什么?
答案 0 :(得分:1)
好像 getMovies(): Observable<Movie[]> {
return this.http.get<Movie[]>(this.moviesUrl)
.pipe(
tap(data => console.log(JSON.stringify(data))),
catchError(this.handleError)
);
}
返回了一个承诺,那么您可以执行以下操作:
repo.getBlob(sha)
或者您可以尝试
repo.getBlob(sha).then(data=> console.log(data))
答案 1 :(得分:0)
您可能必须这样做:
let blob = repo.getBlob(sha, function (error, data) {
console.log("===== BLOB =====");
console.log(data);
});
或者您可以尝试以下操作:
repo.getBlob(sha).then(function (data) {
console.log(data);
});
答案 2 :(得分:0)
好像您正在使用nodegit
库。
因此,根据nodegit API documentation,您必须以这种方式调用getBlob
方法:
repository.getBlob(String).then(function(blob) {
// Use blob
});
祝你好运!