Class Message

Base class for other HTTP requests/responses

Defines some common helper methods, constants and properties.

Direct Subclasses

Namespace: Cake\Network\Http
Location: Network/Http/Message.php

Constants summary

Properties summary

  • $_cookies protected
    array
    The array of cookies in the response.
  • $_headers protected
    array
    The array of headers in the response.
  • $_version protected
    string
    HTTP Version being used.

Method Summary

Method Detail

_normalizeHeader()source protected

_normalizeHeader( string $name )

Normalize header names to Camel-Case form.

Parameters

string $name
The header name to normalize.

Returns

string
Normalized header name.

body()source public

body( string|null $body null )

Get/set the body for the message.

Parameters

string|null $body optional null
The body for the request. Leave null for get

Returns

mixed
Either $this or the body value.

cookies()source public

cookies( )

Get all cookies

Returns

array

headers()source public

headers( )

Get all headers

Returns

array

version()source public

version( )

Get the HTTP version used.

Returns

string

Properties detail

$_cookiessource

protected array

The array of cookies in the response.

[]

$_headerssource

protected array

The array of headers in the response.

[]

$_versionsource

protected string

HTTP Version being used.

'1.1'

© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.2/class-Cake.Network.Http.Message.html