MvcLite\Request::setHeader
Sets a single header
Signature
public function setHeader(string
$name,
string
$value )
Parameters
$name
—
string
- The name of the header to set.
$value
—
string
- The value of the header.
Returns
- Request
- Returns $this, for object-chaining.
Test Coverage
Information
- Coverage: 2/2 Lines (100%)
- Tests: 3
- Passed: 3 (100%)
Tests
- [ PASSED ] — MvcLite\RequestTest::testSetHeader
- [ PASSED ] — MvcLite\RequestTest::testGetContentType with data set "has content type text/plain"
- [ PASSED ] — MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"