An HttpResponse object contains the data returned from the server. After a HttpRequest was sent it also contains the response headers and statuscodes.
data | string | The data returned from the server. This data is processed when creating the HttpResponse object, from the java object. After closing the connection these data are not available anymore. |
An HttpResponse object contains the data returned from the server. After a HttpRequest was sent it also contains the response headers and statuscodes.
obj = HttpResponse(response)
response | nl.modelit.web.client.HttpResult | The Java object with the response data. |
obj | modelit.web.client.HttpResponse | wrapper arounde the nl.modelit.web.client.HttpResult. With methods to access the data, headers and responsecode. Documentation for modelit.web.client.HttpResponse/HttpResponse doc modelit.web.client.HttpResponse |
Get the data returned by the server.
value = getResponseData(obj)
obj | modelit.web.client.HttpResponse |
value | char[]|uint8[] |
Get the response headers as a Matlab containers.Map.
value = getResponseHeaders(obj)
obj | modelit.web.client.HttpResponse |
value | containers.Map | header,value pairs e.g. 'Content-type', 'text/html' |
Get the Http status message corresponding to the status code.
value = getResponseMessage(obj)
obj | modelit.web.client.HttpResponse |
value | string | The http statusmessage e.g. 'OK', see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status |
Get the Http statuscode.
value = getResponseCode(obj)
obj | modelit.web.client.HttpResponse |
value | number | The http statuscode e.g. 200 OK, https://developer.mozilla.org/en-US/docs/Web/HTTP/Status |
Get the exceptions message.
msg = getException(obj)
obj | modelit.web.client.HttpResponse |
msg | string | The exception message. |