hhxsv5 / laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.
MIT License
3.82k stars 471 forks source link

Expose Swoole\Http\Response #448

Closed hhxsv5 closed 1 year ago

hhxsv5 commented 1 year ago
// Set expose_swoole_http_response to true
$router->get('/custom-swoole-response', function () use ($router) {
    /**@var \Swoole\Http\Response $swooleResponse */
    $swooleResponse = app('swoole-http-response');
    $swooleResponse->end('swoole response');
    $swooleResponse->isEnded = true; // isEnded must be set to true, indicating that the underlying Swoole\Http\Response object is directly used to process the response, so the response content is "swoole response" instead of "laravel response".
    return 'laravel response';
});
cr-gpt[bot] commented 1 year ago

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information