Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 cyclejs 在文档加载时向 Web 服务发出 http 请求?这些示例涵盖了对用户输入的反应,但不能满足我的需求。
您可以尝试创建一个请求流并将其传递给 HTTPDriver。例如:
const request$ = Rx.Observable.just({ url: 'http://www.google.com', method: 'GET' });
然后:
return { HTTP: request$ };