【发布时间】:2016-01-11 10:49:08
【问题描述】:
如何在 scala 中连接并读取连续(分块)的 http 流?例如,如果我有这个用 python/bottle 编写的简单服务:
from gevent import monkey; monkey.patch_all()
import gevent
from bottle import route, run
@route('/stream')
def stream():
while True:
yield 'blah\n'
gevent.sleep(1)
run(host='0.0.0.0', port=8100, server='gevent')
我打算使用akka-stream 来处理数据,我只需要一种方法来检索它。
【问题讨论】:
标签: python scala bottle http-streaming akka-stream