Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kHttpServerResponse_AddHeader | ( | kHttpServerResponse | response,
|  | const kChar * | name,
|  | const kChar * | value
| ) |  |

Adds a header value to the response.

Headers that can be determined from the information provided in other functions (e.g. 'Content-Length', 'Transfer-Encoding', 'Connection') will be generated automatically and should not normally be provided via this function.

If multiple headers with the same field name are provided, each subsequent header value will be added to the previous header values (comma-separated).

Leading headers should be added prior to writing the message body. Trailing headers can be generated by calling this function after writing at least one chunk-encoded body segment.

Parameters

  response | Response object.
  name | Header field name.
  value | Header field value.

Returns
  Operation status.