swoole_http_response->header

设置HTTP响应的Header信息。

function swoole_http_response->header(string $key, string $value, bool $ucwords = true);

参数

返回值

注意事项

Swoole底层不允许设置相同$keyHttp

示例

$response->header('Content-Type', 'image/jpeg', false);
$response->header('content-type', 'image/jpeg', true);