我们如何在 SliverList 中实现 Separator/Divider。ListView.separated 是在列表中创建分隔符的便捷方法,但我没有看到任何关于 SliverList 的文档或示例
我正在尝试使用nodejitsu/node-http-proxy制作 HTTP 代理,并且我使用此方法来捕获代理响应
\n\nproxy.on(\'proxyRes\', function (proxyRes, req, res) {\n var body = new Buffer(\'\');\n proxyRes.on(\'data\', function (data) {\n body = Buffer.concat([body, data]);\n });\n proxyRes.on(\'end\', function () {\n body = body.toString();\n console.log("res from proxied server:", body);\n });\n});\n
Run Code Online (Sandbox Code Playgroud)\n\n在这里我能够得到响应,但它在缓冲区中。所以我尝试了很多方法将我的响应转换为字符串格式
\n\n但我得到了这个\nres from proxied server: \xef\xbf\xbdAo\xef\xbf\xbd@\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdj/\xef\xbf\xbdRc\xef\xbf\xbdI\\\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd[\xc9\xa1\xef\xbf\xbdP\xef\xbf\xbd^O\xef\xbf\xbdm\xef\xbf\xbd\xef\xbf\xbdhg\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd"\xef\xbf\xbd\xc4\x89\xef\xbf\xbdJ\xef\xbf\xbdi\xef\xbf\xbdy\xef\xbf\xbd\xef\xbf\xbdg\xef\xbf\xbd\xef\xbf\xbdK\xef\xbf\xbd\xef\xbf\xbdy\xef\xbf\xbd\xef\xbf\xbd%z\xef\xbf\xbd\n\xef\xbf\xbdj:\xef\xbf\xbdJ\xef\xbf\xbd5/\xef\xbf\xbdg]\xef\xbf\xbdB\xef\xbf\xbd\xef\xbf\xbd
如何解决这个问题
\n\n提前致谢
\n