Main Content

getReasonPhrase

Class: matlab.net.http.StatusClass
Namespace: matlab.net.http

StatusClass name as text phrase

Description

meaning = getReasonPhrase(class) returns the status class name as an English-language string with spaces between words.

example

Input Arguments

expand all

Status class, specified as a matlab.net.http.StatusClass object.

Examples

expand all

Send a message to mathworks.com and display the status code category.

uri = matlab.net.URI('https://www.mathworks.com');
req = matlab.net.http.RequestMessage;
resp = send(req, uri);
sc = getClass(resp.StatusCode);
disp(getReasonPhrase(sc))
Successful

Version History

Introduced in R2016b