getReasonPhrase

Class: matlab.net.http.StatusClass
Package: matlab.net.http

StatusClass name as text phrase

Description

example

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

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

Introduced in R2016b