Swoole\Http\Response->trailer

Declaration

<?php
Swoole\Http\Response->trailer(string $key, string $value)

Parameters

key

The key of HTTP response header

value

The value of HTTP response header

Return

Response

Description

Send a HTTP trailer response header to HTTP client. A trailer header is appended to the HTTP body.

Example

HTTP/1.1 200 OK 
Content-Type: text/plain 
Transfer-Encoding: chunked
Trailer: Expires

7\r\n 
Swoole.co.uk\r\n 
9\r\n 
Developer\r\n
0\r\n 
Expires: Wed, 21 Oct 2015 07:28:00 GMT\r\n
\r\n