X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http%2FMessage%2FsetResponseCode.md;h=71ff8f05f1faa2148480eb8c7af26686088f4a90;hb=ac757df7d56fb500d5753aee2d34b5a44cb8ba70;hp=58c8d82272922dfb5a06235b316454ed861a3709;hpb=38ba1c26cfc9bc075be2173cadad4137a7879b32;p=mdref%2Fmdref-http diff --git a/http/Message/setResponseCode.md b/http/Message/setResponseCode.md index 58c8d82..71ff8f0 100644 --- a/http/Message/setResponseCode.md +++ b/http/Message/setResponseCode.md @@ -1,15 +1,22 @@ -# http\Message http\Message::setResponseCode(int $response_code) +# http\Message http\Message::setResponseCode(int $response_code[, bool $strict = true]) Set the response status code. See http\Message::getResponseCode() and http\Message::setResponseStatus(). +> **Note:** This method also resets the response status phrase to the default for that code. + ## Params: * int $response_code The response code. +* Optional bool $strict = true + Whether to check that the response code is between 100 and 599 inclusive. ## Returns: * http\Message, self. -* false, if the message is not of type response. +## Throws: + +* http\Exception\InvalidArgumentException +* http\Exception\BadMethodCallException