Main Content

matlab.net.http.Disposition class

Package:matlab.net.http

Results in HTTP log record

Description

TheDispositionenumeration class provides results in an HTTP log record.

Enumeration Member Name Description
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 theMessageBody.Payloadproperty ofLogRecord.Responsecontains the raw payload and theDataproperty is empty. TheLogRecord.Exceptionproperty contains the exception.

This error does not occur if aContentConsumerwas involved.

Done

A request and response were successfully sent and received.Doneindicates the log record contains both theRequestMessageandResponseMessage. It does not imply anything about theStatusCodein the response.

Interrupt

The user interrupted the operation, for example, pressingCtrl+C. ALogRecordwith thisDispositionappears only if the operation was interrupted after transmission of theRequestMessagehas begun.LogRecord.Exceptionis empty in this case.LogRecordmight be partially populated, depending on when the interrupt occurred. If the interrupt occurred after receipt of a response header, thenLogRecord.Responsecontains the header, and might also contain partial data processed during receipt of the payload, depending on the particular data converter orContentConsumerthat 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 aContentProviderorContentConsumer, or an error trying to convert the outgoing or incoming data from or to MATLAB data. TheLogRecord.Exceptionproperty contains the exception that occurred.

If the error occurred sending the request,LogRecord.Requestcontains the completedRequestMessageobject and theLogRecord.Responseproperty is empty.

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

Introduced in R2016b