📜  将 fetch promise 转换为 observable - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:18.506000             🧑  作者: Mango

代码示例1
var result = Rx.Observable.fromPromise(fetch('http://myserver.com/'));
result.subscribe(x => console.log(x), e => console.error(e));