Home > PHP > Function > > HttpMessage::setResponseStatus()

HttpMessage::setResponseStatus()

HttpMessage::setResponseStatus - Set response status

Syntax

public HttpMessage::setResponseStatus (string $status)

Arguments

  • status - the response status text

Description

Set the Response Status of the HTTP message (i.e. the string following the response code).

Version

PHP PECL pecl_http >= 0.23.0

Return value

Returns TRUE on success or FALSE if the message is not of type HttpMessage:: TYPE_RESPONSE.