Main Content

getReasonPhrase

Class: matlab.net.http.StatusCode
Namespace: matlab.net.http

StatusCode identifier as text phrase

Description

meaning = getReasonPhrase(code) returns the status code identifier as a string (English only) with punctuation and spacing added. The meaning is based on the numeric code. meaning is not necessarily the same as the ReasonPhrase property that the server inserts into the status line of a response message.

example

Input Arguments

expand all

Status code, specified as a matlab.net.http.StatusCode object.

Examples

expand all

sc = matlab.net.http.StatusCode(500);
res = getReasonPhrase(sc)
res = 
'Internal Server Error'

Version History

Introduced in R2016b