This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

getReasonPhrase

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

StatusClass name as text phrase

Syntax

meaning = getReasonPhrase(class)

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