matlab.net.http.HTTPException Class
Namespace: matlab.net.http
Superclasses: MException
Exception thrown by HTTP services
Description
The HTTPException
class contains information about errors.
The RequestMessage.send
method throws an HTTP exception when an error
occurs after it attempts to send a message. For instance, the method
throws an exception when:
Something fails during transmission and the server does not receive the message. Possible causes of failure include a network problem, timeout, or bad URI.
The server receives the message, but something fails while it is sending a response.
The server receives the message and sends a response, but the response cannot be converted based on its Content-Type. For example, a bad JSON string is received.
If an error occurs before the RequestMessage.send
method attempts to send the message, then it throws a standard MException
instead.
The HTTPException
describes the error in the
MException.cause
property and returns a history of the transaction. The
History
property contains the message that was sent and the message
that was received, if any.
Properties
Examples
Version History
Introduced in R2016b