Main Content

getReasonPhrase

Class: matlab.net.http.StatusCode
Package: matlab.net.http

StatusCode identifier as text phrase

Description

example

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.

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'
Introduced in R2016b