Main Content

matlab.net.http.Disposition class

Package: matlab.net.http

Results in HTTP log record

Description

The Disposition enumeration class provides results in an HTTP log record.

Enumeration Member NameDescription
ConversionError

An error occurred converting the data of the response. The request was received, but there was an error trying to automatically convert the payload of the response. This condition indicates that the MessageBody.Payload property of LogRecord.Response contains the raw payload and the Data property is empty. The LogRecord.Exception property contains the exception.

This error does not occur if a ContentConsumer was involved.

Done

A request and response were successfully sent and received. Done indicates the log record contains both the RequestMessage and ResponseMessage. It does not imply anything about the StatusCode in the response.

Interrupt

The user interrupted the operation, for example, pressing Ctrl+C. A LogRecord with this Disposition appears only if the operation was interrupted after transmission of the RequestMessage has begun. LogRecord.Exception is empty in this case. LogRecord might be partially populated, depending on when the interrupt occurred. If the interrupt occurred after receipt of a response header, then LogRecord.Response contains the header, and might also contain partial data processed during receipt of the payload, depending on the particular data converter or ContentConsumer that was being used.

TransmissionError

An error occurred sending or receiving the message. The failure could be due to an I/O error such as a disconnect or timeout, a failure in a ContentProvider or ContentConsumer, or an error trying to convert the outgoing or incoming data from or to MATLAB data. The LogRecord.Exception property contains the exception that occurred.

If the error occurred sending the request, LogRecord.Request contains the completed RequestMessage object and the LogRecord.Response property is empty.

If the error occurred receiving the response, LogRecord.Response might be empty if complete headers were not received. If headers were received but the payload could not be read, then the ResponseMessage object contains the headers and might contain all or part of the payload that was received.

Version History

Introduced in R2016b