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
string | number | booleander request type
Returns
RestConfigRestConfig
addHeader
addHeader(
pName,pValue):RestConfig
Adds a header entry.
Parameters
string | number | booleanthe name of the header entry
string | number | booleanthe value of the header entry
Returns
RestConfigRestConfig
addHeaders
addHeaders(
pName,pValues):RestConfig
Adds a header entry.
Parameters
string | number | booleanthe name of the header entry
string[]the values of the header entry
Returns
RestConfigRestConfig
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
string | number | booleanthe name of the parameter
string | number | booleanthe value of the parameter
Returns
RestConfigRestConfig
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
string | number | booleanthe name of the parameter
string[]the values of the parameter
Returns
RestConfigRestConfig
connectionTimeoutInMillis
connectionTimeoutInMillis(
pValue):RestConfig
The timeout in milliseconds when connecting.
Parameters
numberthe value
Returns
RestConfigRestConfig
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
string | number | booleanthe mime type to accept
Returns
RestConfigRestConfig
dataTypeJDitoAccept
dataTypeJDitoAccept(
pDataTypeAccept):RestConfig
The ADITO data type for receiving data (util.DATA_TEXT, util.DATA_BINARY).
Parameters
numberthe mime type to accept, defaults to DATA_BINARY
Returns
RestConfigRestConfig
dataTypeJDitoSend
dataTypeJDitoSend(
pDataTypeSend):RestConfig
The ADITO data type for sending data (util.DATA_TEXT, util.DATA_BINARY).
Parameters
numberthe mime type to send, defaults to DATA_BINARY
Returns
RestConfigRestConfig
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
string | number | booleanthe mime type to send
Returns
RestConfigRestConfig
getActionType
getActionType():
string
Returns the action type.
Returns
stringthe action type as String
getConnectionTimeoutInMillis
getConnectionTimeoutInMillis():
number
Returns the timeout in milliseconds when reading.
Returns
numberthe timeout value
getDatatypeAccept
getDatatypeAccept():
string
Returns the accepted data type.
Returns
stringthe 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
numberthe datatype as int
getDatatypeJDitoSend
getDatatypeJDitoSend():
number
Returns the sent data type.
Returns
numberthe datatype as int
getDataTypeSend
getDataTypeSend():
string
Returns the sent data type.
Returns
stringthe 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
numberthe timeout value
getRequestEntity
getRequestEntity():
string
Returns the request entity.
Returns
stringentity 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
stringthe URL
isMultipart
isMultipart():
boolean
Returns if the request is effectively a multipart request because it has multipart request objects.
Returns
booleantrue 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
booleantrue if the extended informations is to be used, false otherwise
readTimeoutInMillis
readTimeoutInMillis(
pValue):RestConfig
The timeout in milliseconds when reading.
Parameters
numberthe value
Returns
RestConfigRestConfig
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
string | number | booleanthe Entity
Returns
RestConfigRestConfig
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
Multipart[]the Entity as a List of Entity-Parts
string | number | booleanthe boundary String, maybe null and therefore automatically filled
Returns
RestConfigRestConfig
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
booleanboolean value
Returns
RestConfigRestConfig
url
url(
pUrl):RestConfig
The URL to be called in the webservice request.
Parameters
string | number | booleanthe URL
Returns
RestConfigRestConfig