Skip to main content
Version: 2025.1

RestConfig

Configuration object for Rest webservice class. The resultring configuration object ist checked for plausibility when the rest call is executed (validation).

Methods

actionType

actionType(pActionType): RestConfig

The type of the request, e.g. GET or POST. Possible values are GET, POST, PUT, PATCH, DELETE, COPY, HEAD, OPTIONS.

Parameters

pActionType
string | number | boolean

der request type

Returns

RestConfig

RestConfig


addHeader

addHeader(pName, pValue): RestConfig

Adds a header entry.

Parameters

pName
string | number | boolean

the name of the header entry

pValue
string | number | boolean

the value of the header entry

Returns

RestConfig

RestConfig


addHeaders

addHeaders(pName, pValues): RestConfig

Adds a header entry.

Parameters

pName
string | number | boolean

the name of the header entry

pValues
string[]

the values of the header entry

Returns

RestConfig

RestConfig


addQueryParameter

addQueryParameter(pName, pValue): RestConfig

Adds a query parameter.

Note: Curly braces in parameter values (e.g. {value}) are not automatically escaped. This is due to underlying JDK behavior where such values may be interpreted as URI templates (see UriBuilder.queryParam(java.lang.String, java.lang.Object...)).

To avoid unexpected behavior, manually escape values if no templating is intended.

Parameters

pName
string | number | boolean

the name of the parameter

pValue
string | number | boolean

the value of the parameter

Returns

RestConfig

RestConfig


addQueryParameters

addQueryParameters(pName, pValues): RestConfig

Adds a query parameter.

Note: Curly braces in parameter values (e.g. {value}) are not automatically escaped. This is due to underlying JDK behavior where such values may be interpreted as URI templates (see UriBuilder.queryParam(java.lang.String, java.lang.Object...)).

To avoid unexpected behavior, manually escape values if no templating is intended.

Parameters

pName
string | number | boolean

the name of the parameter

pValues
string[]

the values of the parameter

Returns

RestConfig

RestConfig


connectionTimeoutInMillis

connectionTimeoutInMillis(pValue): RestConfig

The timeout in milliseconds when connecting.

Parameters

pValue
number

the value

Returns

RestConfig

RestConfig


dataTypeAccept

dataTypeAccept(pDataTypeAccept): RestConfig

Desired data type of the response, must be supported by the server. Default is "TEXT/PLAIN". Available: text/plain, text/xml, text/html, multipart/form-data, application/xml, application/xhtml+xml, application/svg+xml, application/octet-stream, application/json, application/x-www-form-urlencoded, application/atom+xml.

Parameters

pDataTypeAccept
string | number | boolean

the mime type to accept

Returns

RestConfig

RestConfig


dataTypeJDitoAccept

dataTypeJDitoAccept(pDataTypeAccept): RestConfig

The ADITO data type for receiving data (util.DATA_TEXT, util.DATA_BINARY).

Parameters

pDataTypeAccept
number

the mime type to accept, defaults to DATA_BINARY

Returns

RestConfig

RestConfig


dataTypeJDitoSend

dataTypeJDitoSend(pDataTypeSend): RestConfig

The ADITO data type for sending data (util.DATA_TEXT, util.DATA_BINARY).

Parameters

pDataTypeSend
number

the mime type to send, defaults to DATA_BINARY

Returns

RestConfig

RestConfig


dataTypeSend

dataTypeSend(pDataTypeSend): RestConfig

The data type of the request you sent to the server. Default is "TEXT/PLAIN". See dataTypeAccept for more information.

Parameters

pDataTypeSend
string | number | boolean

the mime type to send

Returns

RestConfig

RestConfig


getActionType

getActionType(): string

Returns the action type.

Returns

string

the action type as String


getConnectionTimeoutInMillis

getConnectionTimeoutInMillis(): number

Returns the timeout in milliseconds when reading.

Returns

number

the timeout value


getDatatypeAccept

getDatatypeAccept(): string

Returns the accepted data type.

Returns

string

the datatype as String


getDatatypeJDitoAccept

getDatatypeJDitoAccept(): number

Returns the accepted data type. Possible values: JScriptUtil.DATA_TEXT or JScriptUtil.DATA_BINARY Default value is DATA_TEXT.

Returns

number

the datatype as int


getDatatypeJDitoSend

getDatatypeJDitoSend(): number

Returns the sent data type.

Returns

number

the datatype as int


getDataTypeSend

getDataTypeSend(): string

Returns the sent data type.

Returns

string

the datatype as String


getHeaders

getHeaders(): Map<string, string[]>

Returns a copy of the headers.

Returns

Map<string, string[]>

Mapinvalid input: '<'String, String>


getQueryParameters

getQueryParameters(): Map<string, string[]>

Returns a copy of the query parameters.

Returns

Map<string, string[]>

Mapinvalid input: '<'String, String>


getReadTimeoutInMillis

getReadTimeoutInMillis(): number

Returns the timeout in milliseconds when reading.

Returns

number

the timeout value


getRequestEntity

getRequestEntity(): string

Returns the request entity.

Returns

string

entity as String


getRequestEntityMultipart

getRequestEntityMultipart(): Multipart[]

The list of multipart request objects for this request.

Returns

Multipart[]

List of Multipart objects


getUrl

getUrl(): string

Return the URL of the webservice request.

Returns

string

the URL


isMultipart

isMultipart(): boolean

Returns if the request is effectively a multipart request because it has multipart request objects.

Returns

boolean

true if the request is effectively a multipart request, false otherwise


isReturnExtendedResponseInfos

isReturnExtendedResponseInfos(): boolean

Returns if extended response information is to be put into the result of the webservice call.

Returns

boolean

true if the extended informations is to be used, false otherwise


readTimeoutInMillis

readTimeoutInMillis(pValue): RestConfig

The timeout in milliseconds when reading.

Parameters

pValue
number

the value

Returns

RestConfig

RestConfig


requestEntity

requestEntity(pEntity): RestConfig

The contents of the request. (Optional) Is passed as an XML structure. Mime types must be written in lowercase letters!

Parameters

pEntity
string | number | boolean

the Entity

Returns

RestConfig

RestConfig


requestEntityMultipart

requestEntityMultipart(entity, multipartBoundary): RestConfig

The contents of the request. (Optional) Is passed as a List of Strings. Header has to contain this: 'content-type': 'multipart/form-data; boundary=<boundary> ' </boundary>

Parameters

entity
Multipart[]

the Entity as a List of Entity-Parts

multipartBoundary
string | number | boolean

the boundary String, maybe null and therefore automatically filled

Returns

RestConfig

RestConfig


returnExtendedResponseInfos

returnExtendedResponseInfos(pFlag): RestConfig

When set to true this causes the webservice call to return a Json as response. Otherwise the body of the response is returned.

Parameters

pFlag
boolean

boolean value

Returns

RestConfig

RestConfig


url

url(pUrl): RestConfig

The URL to be called in the webservice request.

Parameters

pUrl
string | number | boolean

the URL

Returns

RestConfig

RestConfig