Class: modelit.web.client.HttpResponse

DESCRIPTION:

An HttpResponse object contains the data returned from the server. After a HttpRequest was sent it also contains the response headers and statuscodes.

Properties

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.

Public Method: HttpResponse

DESCRIPTION:

An HttpResponse object contains the data returned from the server. After a HttpRequest was sent it also contains the response headers and statuscodes.

CALL:

obj = HttpResponse(response)

INPUT:

response nl.modelit.web.client.HttpResult
The Java object with the response data.

OUTPUT:

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

Public Method: getResponseData

DESCRIPTION:

Get the data returned by the server.

CALL:

value = getResponseData(obj)

INPUT:

obj modelit.web.client.HttpResponse

OUTPUT:

value char[]|uint8[]

Public Method: getResponseHeaders

DESCRIPTION:

Get the response headers as a Matlab containers.Map.

CALL:

value = getResponseHeaders(obj)

INPUT:

obj modelit.web.client.HttpResponse

OUTPUT:

value containers.Map
header,value pairs e.g. 'Content-type', 'text/html'

Public Method: getResponseMessage

DESCRIPTION:

Get the Http status message corresponding to the status code.

CALL:

value = getResponseMessage(obj)

INPUT:

obj modelit.web.client.HttpResponse

OUTPUT:

value string
The http statusmessage e.g. 'OK', see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

Public Method: getResponseCode

DESCRIPTION:

Get the Http statuscode.

CALL:

value = getResponseCode(obj)

INPUT:

obj modelit.web.client.HttpResponse

OUTPUT:

value number
The http statuscode e.g. 200 OK, https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

Public Method: getExceptionMessage

DESCRIPTION:

Get the exceptions message.

CALL:

msg = getException(obj)

INPUT:

obj modelit.web.client.HttpResponse

OUTPUT:

msg string
The exception message.