matlab.net.http.LogRecord Class
Namespace: 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.
Properties
URI
— URI of request
matlab.net.URI
URI of the request, specified as a matlab.net.URI
object.
Attributes:
GetAccess | public |
SetAccess | public |
Request
— Request message
matlab.net.http.RequestMessage
object
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 |
RequestTime
— Start and end times of request message
pair of datetime
objects
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
— Response message
matlab.net.http.ResponseMessage
object
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 |
ResponseTime
— Start and end times of response message
pair of datetime
objects
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
— Disposition of exchange
matlab.net.http.Disposition
enumeration
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
— Exception
MException
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
Public Methods
show | Display or return human-readable version of vector of LogRecords |
Version History
Introduced in R2016b
See Also
send
| ResponseMessage
| StartLine
| matlab.net.URI
| Disposition
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)