Main Content

matlab.net.http.LogRecord类

Package:matlab.net.http

HTTP history log record

Description

A vector ofLogRecord对象represents a history of request-response message pairs exchanged between client and server during an HTTP operation, such asRequestMessage.send. Thesendmethod returns history as an output argument. When an error occurs, theHTTPExceptionobject contains aHistoryproperty.

Use theLogRecordclass for debugging.

Class Attributes

Sealed
true

For information on class attributes, seeClass Attributes.

Properties

expand all

URI of the request, specified as amatlab.net.URIobject.

Attributes:

GetAccess
public
SetAccess
public

Request message, specified as amatlab.net.http.RequestMessageobject.Requestcontains a value if MATLAB®attempted to send the header of the request message, even if an exception occurs in the process of sending the payload. If an exception occurs, then theExceptionproperty contains theMException.

TheRequest.Bodyproperty contains the body of the request message, if any. TheRequest.Body.Payloadproperty is set only if you specify theSavePayloadproperty in anHTTPOptionsobject.

Attributes:

GetAccess
public
SetAccess
public

Start and end times of a request message, specified as a pair ofdatetime对象.RequestTimecontains a value only if theRequestproperty is set.

TheRequestTime值是一个近似的时候first and last bytes, including the payload, of a request message were sent. If an exception occurs during transmission, then the end time is the time of the exception, and theExceptionproperty contains theMException.

Attributes:

GetAccess
public
SetAccess
public

Data Types:datetime

Response message, specified as amatlab.net.http.ResponseMessageobject.Responsecontains a value only if the complete header of the response is received successfully, even if an exception occurs receiving the payload. If an exception occurs while trying to send the request or during receipt of the header, thenResponsemight be empty. If an exception occurs, then theExceptionproperty contains theMExceptionobject.

TheResponse.Bodyproperty is set if you specify theSavePayloadproperty in anHTTPOptionsobject and the response has a body. IfResponse.Bodyis set, then theResponse.Body.Payloadproperty is also set.

Attributes:

GetAccess
public
SetAccess
public

Start and end times of the response message, specified as a pair ofdatetime对象.ResponseTimecontains a value only if theResponseproperty is set.

TheResponseTime值是一个近似的时候first and last bytes of the response message are received. If an exception occurs during receipt, then the end time is the time of the exception, and theExceptionproperty contains theMExceptionobject.

Attributes:

GetAccess
public
SetAccess
public

Data Types:datetime

Disposition of the exchange, specified as amatlab.net.http.Dispositionenumeration, indicating the result of the exchange. If theDispositionvalue isDone, then theExceptionproperty is empty and all fields of theLogRecordcontain their final values.

Some values ofDispositionimply that an exception was saved in theExceptionproperty. If an exception occurs, theResponseorRequestproperties might not be set. When these values are set depends on whether the exception occurs before or during the transmission of the headers or the payload.

Attributes:

GetAccess
public
SetAccess
public

Exception, specified as anMExceptionobject that occurred during processing of the exchange. If an error occurred during the transmission, receipt, or processing of the response, this property is theMExceptioncontaining the exception. The value of theDispositionproperty determines whether this property is set.

Attributes:

GetAccess
public
SetAccess
public

Methods

expand all

Version History

Introduced in R2016b