2.4.0 notes
[mdref/mdref-http] / http / Env / Response.md
1 # class http\Env\Response extends http\Message is callable
2
3 The http\Env\Response class' instances represent the server's current HTTP response.
4
5 See http\Message for inherited members.
6
7 ## Changelog:
8
9 Version | Changes
10 --------|--------
11 2.2.0 | Added http\Env\Response::setCookie() and http\Env\Response::$cookies.
12
13 ## Constants:
14
15 * CONTENT_ENCODING_NONE
16 Do not use content encoding.
17 * CONTENT_ENCODING_GZIP
18 Support "Accept-Encoding" requests with gzip and deflate encoding.
19 * CACHE_NO
20 No caching info available.
21 * CACHE_HIT
22 The cache was hit.
23 * CACHE_MISS
24 The cache was missed.
25
26 ## Properties:
27
28 * protected http\Env\Request $request = NULL
29 A request instance which overrides the environments default request.
30 * protected string $contentType = NULL
31 The response's MIME content type.
32 * protected string $contentDisposition = NULL
33 The response's MIME content disposition.
34 * protected int $contentEncoding = NULL
35 See http\Env\Response::CONTENT_ENCODING_* constants.
36 * protected string $cacheControl = NULL
37 How the client should treat this response in regards to caching.
38 * protected string $etag = NULL
39 A custom ETag.
40 * protected int $lastModified = NULL
41 A "Last-Modified" time stamp.
42 * protected int $throttleDelay = NULL
43 Any throttling delay.
44 * protected int $throttleChunk = NULL
45 The chunk to send every $throttleDelay seconds.
46 * protected array $cookies = NULL
47 The response's cookies.