Main Content

matlab.net.http.LogRecord class

Package: matlab.net.http

HTTP history log record

Description

A vector of LogRecord objects represents a history of request-response message pairs exchanged between client and server during an HTTP operation, such as RequestMessage.send. The send method returns history as an output argument. When an error occurs, the HTTPException object contains a History property.

Use the LogRecord class for debugging.

Class Attributes

Sealed
true

For information on class attributes, see Class Attributes.

Properties

expand all

URI of the request, specified as a matlab.net.URI object.

Attributes:

GetAccess
public
SetAccess
public

Request message, specified as a matlab.net.http.RequestMessage object. Request contains 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 the Exception property contains the MException.

The Request.Body property contains the body of the request message, if any. The Request.Body.Payload property is set only if you specify the SavePayload property in an HTTPOptions object.

Attributes:

GetAccess
public
SetAccess
public

Start and end times of a request message, specified as a pair of datetime objects. RequestTime contains a value only if the Request property is set.

The RequestTime values are an approximation of the times when the 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 the Exception property contains the MException.

Attributes:

GetAccess
public
SetAccess
public

Data Types: datetime

Response message, specified as a matlab.net.http.ResponseMessage object. Response contains 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, then Response might be empty. If an exception occurs, then the Exception property contains the MException object.

The Response.Body property is set if you specify the SavePayload property in an HTTPOptions object and the response has a body. If Response.Body is set, then the Response.Body.Payload property is also set.

Attributes:

GetAccess
public
SetAccess
public

Start and end times of the response message, specified as a pair of datetime objects. ResponseTime contains a value only if the Response property is set.

The ResponseTime values are an approximation of the times when the 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 the Exception property contains the MException object.

Attributes:

GetAccess
public
SetAccess
public

Data Types: datetime

Disposition of the exchange, specified as a matlab.net.http.Disposition enumeration, indicating the result of the exchange. If the Disposition value is Done, then the Exception property is empty and all fields of the LogRecord contain their final values.

Some values of Disposition imply that an exception was saved in the Exception property. If an exception occurs, the Response or Request properties 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 an MException object that occurred during processing of the exchange. If an error occurred during the transmission, receipt, or processing of the response, this property is the MException containing the exception. The value of the Disposition property determines whether this property is set.

Attributes:

GetAccess
public
SetAccess
public

Methods

expand all

Version History

Introduced in R2016b