http\Message http\Message::setHeader(string $header[, mixed $value = NULL])

Set a single header. See http\Message::getHeader() and http\Message::addHeader().

NOTE:
Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single header with values concatenated by comma.

Params:

Returns:

Changelog:

  1. v2.5.6, v3.1.0
    • Multiple headers with the same name are kept separate instead of merged together.