Package:matlab.net.http
Superclasses:MException
Exception thrown by HTTP services
TheHTTPException
class contains information about errors.
TheRequestMessage.send
method throws an HTTP exception when an error occursafterit 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 occursbeforetheRequestMessage.send
method attempts to send the message, then it throws a standardMException
instead.
TheHTTPException
describes the error in theMException.cause
property and returns a history of the transaction. TheHistory
property contains the message that was sent and the message that was received, if any.