W3cubDocs

/CakePHP 3.4

Class Message

Base class for other HTTP requests/responses

Defines some common helper methods, constants and properties.

Direct Subclasses

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

Constants summary

Properties summary

  • $_body protected
    string|null
    Body for the message.
  • $_cookies protected
    array
    The array of cookies in the response.

Method Summary

Method Detail

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

Deprecated

3.3.0 Use getHeaders() instead.

Returns

array

Properties detail

$_bodysource

protected string|null

Body for the message.

$_cookiessource

protected array

The array of cookies in the response.

[]

© 2005–2017 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.
https://api.cakephp.org/3.4/class-Cake.Http.Client.Message.html