You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This server class allows operating with REST responses.

SimpleRestResponseApi(response)

NameTypeMandatoryDefault Value
responseResponseYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

SimpleRestResponseApi
var sm = sws.SimpleRestResponseApi(response);

getBody()

This method returns the response body.


Return:

TypeDescription
StringThe response body.


Example:

getBody
var sm = sws.SimpleRestResponseApi(response);
var body = sm.getBody();

getAllHeaders()

This method returns the array containing response headers.


Return:

TypeDescription
ArrayResponse headers.


Example:

getAllHeaders
var sm = sws.SimpleRestResponseApi(response);
var headers = sm.getAllHeaders();

getStatusCode()

Returns the HTTP status code.


Return:

TypeDescription
StringHTTP status code.


Example:

getStatusCode
var sm = sws.SimpleRestResponseApi(response);
var status = sm.getStatusCode();

haveError()

This method displays if there was an error during the REST transaction.


Return:

TypeDescription
BooleanThe error notification.


Example:

haveError
var sm = sws.SimpleRestResponceApi(response);
var error = sm.getHaveError();

  • No labels