#### 问题描述
代码里面设置的 Transfer-Encoding:chunked
这里写问题描述

```
$ask = $request->input('ask');
if(!$ask){
return json(['code' => 1005,'msg' => '缺少必要参数']);
}
$apikey = '';
$secretKey = '';
$traceId = uniqid();//'A9AB29036A9D4E05545116DA32123dsf2';
$timestamp = time();
$url = 'xxxx' . $apikey;
$http = new \Workerman\Http\Client();
$connection = $request->connection;
$bufferSend = new Response(200, ['Content-Type' => 'text/event-stream'],"\r\n");
$connection->send($bufferSend,true);
$data = [
'traceId' => $traceId,
'timestamp' => $timestamp,
'stream' => true,
'messages' => [
[
'content' => $ask,
'role' => 'user'
]
],
];
$http->request($url, [
'method' => 'POST',
'data' => json_encode($data),
'headers' => [
'Content-Type' => 'application/json',
'App-Sign' => $this->makeXcSign($apikey,$secretKey,$traceId,$timestamp),
],
'progress' => function($buffer) use ($connection) {
$connection->send($buffer, true);
},
'success' => function($response) use ($connection) {
$connection->send(new Chunk(''));
$connection->close();
},
]);
return (new Response(200, [
"Transfer-Encoding" => "chunked",
]));
```