Main Content

matlab.net.http.StatusLine class

Package:matlab.net.http
Superclasses:matlab.net.http.StartLine

First line of HTTP response message

Description

The server inserts aStatusLineobject into every HTTP response message. For information about a status line, seeRFC 7230 Status Line, section 3.1.2.

Class Attributes

Sealed
true

For information on class attributes, seeClass Attributes.

Creation

obj = StatusLine(protocolVersion,statusCode,reasonPhrase)creates a status line with the specifiedproperties. Use constructors for testing.

obj = StatusLine(str)creates a status line by parsingstr.

Input Arguments

expand all

Status line, specified as a string or a character vector.

Properties

expand all

Protocol version, specified as amatlab.net.http.ProtocolVersionobject.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true

Status code, specified as amatlab.net.http.StatusCodeenumeration, string, or integer. The value is aStatusCodeobject if the server returns one of its enumeration values. If the server returns a number, then the value is an integer.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true

Reason phrase from server, specified as a string.ReasonPhraseis empty if the server does not provide a reason. This value is not necessarily the same as the value returned by theStatusCode.getReasonPhrasemethod.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true

Methods

expand all

版本历史

Introduced in R2016b