Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Swoole\Http\Request::rawcontentSwoole\Http\Response::cookie>
^SwooleLast updated: Mon, 26 Oct 2026

The Swoole\Http\Response class

(PECL swoole >= 1.9.0)

Introduction

Class synopsis

class Swoole\Http\Response {
/* Methods */
public function cookie(
    string $name,
    string $value = ?,
    string $expires = ?,
    string $path = ?,
    string $domain = ?,
    string $secure = ?,
    string $httponly = ?
): string
public function __destruct(): void
public function end(string $content = ?): void
public function gzip(string $compress_level = ?): ReturnType
public function header(string $key, string $value, string $ucwords = ?): void
public function initHeader(): ReturnType
public function rawcookie(
    string $name,
    string $value = ?,
    string $expires = ?,
    string $path = ?,
    string $domain = ?,
    string $secure = ?,
    string $httponly = ?
): ReturnType
public function sendfile(string $filename, int $offset = ?): ReturnType
public function status(string $http_code): ReturnType
public function write(string $content): void
}

Table of Contents


<Swoole\Http\Request::rawcontentSwoole\Http\Response::cookie>
^SwooleLast updated: Mon, 26 Oct 2026