我需要访问"原创"流的价值。
我的用例:
示例代码:
const Rx = require('rxjs');
const request = require('request');
// my request method in Rx version
const req = Rx.Observable.bindNodeCallback(request);
const list = [/*list of URLs*/];
Rx.Observable.from(list)
.flatMap(req) // eq to: .flatMap(url => req(url))
.map(response => {
// here I need the response object
// and the URL I used to request it (the "original" value).
});
有什么想法吗? :)