Interface IHttpRequestNodeBuilder
-
public interface IHttpRequestNodeBuilder
Builder for configuring aEWorkflowNodeType.FC_POST_REQUEST
action.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IHttpRequestNodeBuilder
allowInvalidCertificates(boolean allowInvalidCertificates)
When connecting via HTTPS, sets whether to allow invalid certificates.IHttpRequestNodeBuilder
asResponsePage(boolean asResponsePage)
IHttpRequestNodeBuilder
attachToFormRecord(boolean attachToFormRecord)
IHttpRequestNodeBuilder
basicAuth(String username, String password)
Sets up basic authentication for the HTTP request.WorkflowNode
build()
Creates a new workflow node for aEWorkflowNodeType.FC_POST_REQUEST
that sends a HTTP request to the given URL.FcHttpRequestProps
buildProps()
Creates a new model for a workflow action that sends a HTTP request to the given URL.IHttpRequestNodeBuilder
connectTimeout(TimeDuration connectTimeout)
IHttpRequestNodeBuilder
customBodyContent(String customBodyContent)
IHttpRequestNodeBuilder
customLocationResolutionUri(String customLocationResolutionUri)
When theresolution type
for theLocation
header is set toRESOLVE_AGAINST_CUSTOM_URI
: the custom URI against which to resolve the URI from theLocation
header.IHttpRequestNodeBuilder
disallowMessageBody(boolean disallowMessageBody)
Lets you decide whether a custom HTTP verb supports a message body.IHttpRequestNodeBuilder
filesToTransmit(MultiFile filesToTransmit)
IHttpRequestNodeBuilder
header(String name, String value)
Includes an additional header in the HTTP request.IHttpRequestNodeBuilder
headers(Map<String,List<String>> headers)
IHttpRequestNodeBuilder
httpBodyType(EHttpRequestType httpBodyType)
IHttpRequestNodeBuilder
inputCharset(String inputCharset)
IHttpRequestNodeBuilder
locationResolutionType(EHttpLocationResolutionType locationResolutionType)
When the HTTP response has a 3xx status code with aLocation
header, controls how to resolve the URI in that header.IHttpRequestNodeBuilder
multipartHeaderType(EMultipartHeaderType multipartHeaderType)
IHttpRequestNodeBuilder
outputCharset(String outputCharset)
IHttpRequestNodeBuilder
outputFileName(String outputFileName)
IHttpRequestNodeBuilder
parameter(String name, String value)
Includes an additional form parameter in the HTTP request.IHttpRequestNodeBuilder
parameters(Map<String,List<String>> parameters)
Includes additional form parameters to send with the HTTP request.IHttpRequestNodeBuilder
proxy(String host, int port)
Sets up a proxy for transmitting the HTTP request.IHttpRequestNodeBuilder
proxy(String host, int port, String username, String password)
Sets up a proxy for transmitting the HTTP request.IHttpRequestNodeBuilder
readTimeout(TimeDuration readTimeout)
IHttpRequestNodeBuilder
sendAllFormValues(boolean sendAllFormValues, boolean useFieldAlias)
IHttpRequestNodeBuilder
singleFileToTransmit(SingleFile singleFileToTransmit)
IHttpRequestNodeBuilder
treat4xxAsNormal(boolean treat4xxAsNormal)
Lets you decide whether HTTP status codes in the 400-499 range are treated as errors.IHttpRequestNodeBuilder
treat5xxAsNormal(boolean treat5xxAsNormal)
Lets you decide whether HTTP status codes in the 500-599 range are treated as errors.IHttpRequestNodeBuilder
xslTemplate(Textbaustein xslTemplate)
-
-
-
Method Detail
-
allowInvalidCertificates
IHttpRequestNodeBuilder allowInvalidCertificates(boolean allowInvalidCertificates)
When connecting via HTTPS, sets whether to allow invalid certificates.- Parameters:
allowInvalidCertificates
- Whentrue
, allows invalid certificates.- Returns:
- This builder for chaining methods calls.
-
asResponsePage
IHttpRequestNodeBuilder asResponsePage(boolean asResponsePage)
- Parameters:
asResponsePage
- Iftrue
, returns the response from the HTTP request as the workflow response. That is, when the user submits a form and the workflow is triggered, send the response back to the user.- Returns:
- This builder for chaining methods calls.
-
attachToFormRecord
IHttpRequestNodeBuilder attachToFormRecord(boolean attachToFormRecord)
- Parameters:
attachToFormRecord
- Whether to attach the HTTP request response as a file to the current form record.- Returns:
- This builder for chaining methods calls.
-
basicAuth
IHttpRequestNodeBuilder basicAuth(String username, String password)
Sets up basic authentication for the HTTP request.- Parameters:
username
- User name for the basic authentication.password
- Password for the basic authentication.- Returns:
- This builder for chaining methods calls.
-
build
WorkflowNode build() throws FastJsonException
Creates a new workflow node for aEWorkflowNodeType.FC_POST_REQUEST
that sends a HTTP request to the given URL.- Returns:
- The workflow node for an HTTP request action.
- Throws:
FastJsonException
- When the properties model could not be serialized.
-
buildProps
FcHttpRequestProps buildProps()
Creates a new model for a workflow action that sends a HTTP request to the given URL.- Returns:
- The properties model for an HTTP request action.
-
connectTimeout
IHttpRequestNodeBuilder connectTimeout(TimeDuration connectTimeout)
- Parameters:
connectTimeout
- Maximum time to wait when establishing a connection to the server.- Returns:
- This builder for chaining methods calls.
-
customBodyContent
IHttpRequestNodeBuilder customBodyContent(String customBodyContent)
- Parameters:
customBodyContent
- The custom body content to send with the HTTP request, e.g. to make custom REST API calls.- Returns:
- This builder for chaining methods calls.
-
customLocationResolutionUri
IHttpRequestNodeBuilder customLocationResolutionUri(String customLocationResolutionUri)
When theresolution type
for theLocation
header is set toRESOLVE_AGAINST_CUSTOM_URI
: the custom URI against which to resolve the URI from theLocation
header.- Parameters:
customLocationResolutionUri
- Custom URI against which to resolve the URI from theLocation
header.- Returns:
- This builder for chaining methods calls.
-
disallowMessageBody
IHttpRequestNodeBuilder disallowMessageBody(boolean disallowMessageBody)
Lets you decide whether a custom HTTP verb supports a message body. Has no effect for standard HTTP verbs such asPOST
orGET
.- Parameters:
disallowMessageBody
- When a custom HTTP verb is selected, indicates whether a message body is allowed. If no message body is allowed, parameters will be added as URL parameters and no files will be sent.- Returns:
- This builder for chaining methods calls.
-
filesToTransmit
IHttpRequestNodeBuilder filesToTransmit(MultiFile filesToTransmit)
- Parameters:
filesToTransmit
- Files to transmit with the HTTP request (requires a multipart request, seehttpBodyType(EHttpRequestType)
).- Returns:
- This builder for chaining methods calls.
-
header
IHttpRequestNodeBuilder header(String name, String value)
Includes an additional header in the HTTP request.- Parameters:
name
- Name of the header.value
- Value of the header.- Returns:
- This builder for chaining methods calls.
-
headers
IHttpRequestNodeBuilder headers(Map<String,List<String>> headers)
- Parameters:
headers
- Headers to send with the HTTP request. Replaces all headers that were set on this builder.- Returns:
- This builder for chaining methods calls.
-
httpBodyType
IHttpRequestNodeBuilder httpBodyType(EHttpRequestType httpBodyType)
- Parameters:
httpBodyType
- How to create the content of the HTTP request body.- Returns:
- This builder for chaining methods calls.
-
inputCharset
IHttpRequestNodeBuilder inputCharset(String inputCharset)
- Parameters:
inputCharset
- Input character set, i.e. the encoding used for sending the HTTP request.- Returns:
- This builder for chaining methods calls.
-
locationResolutionType
IHttpRequestNodeBuilder locationResolutionType(EHttpLocationResolutionType locationResolutionType)
When the HTTP response has a 3xx status code with aLocation
header, controls how to resolve the URI in that header. Defaults toRESOLVE_AGAINST_REQUEST_URI
according to RFC 7231.- Parameters:
locationResolutionType
- How to handle URIs in theLocation
header.- Returns:
- This builder for chaining methods calls.
-
multipartHeaderType
IHttpRequestNodeBuilder multipartHeaderType(EMultipartHeaderType multipartHeaderType)
- Parameters:
multipartHeaderType
- How to handle Unicode characters in headers of multipart HTTP requests.- Returns:
- This builder for chaining methods calls.
-
outputCharset
IHttpRequestNodeBuilder outputCharset(String outputCharset)
- Parameters:
outputCharset
- Output character set, e.g. the expected encoding of the response.- Returns:
- This builder for chaining methods calls.
-
outputFileName
IHttpRequestNodeBuilder outputFileName(String outputFileName)
- Parameters:
outputFileName
- The file name to use for writing the content of the HTTP response to a file. May contain placeholders. When empty, the file name is determined automatically, either from the response headers or from the request URL.- Returns:
- This builder for chaining methods calls.
-
parameter
IHttpRequestNodeBuilder parameter(String name, String value)
Includes an additional form parameter in the HTTP request.- Parameters:
name
- Name of the parameter.value
- Value of the parameter.- Returns:
- This builder for chaining methods calls.
-
parameters
IHttpRequestNodeBuilder parameters(Map<String,List<String>> parameters)
Includes additional form parameters to send with the HTTP request. Replaces existing parameters set on this builder.- Parameters:
parameters
- Form parameters to send with the HTTP request.- Returns:
- This builder for chaining methods calls.
-
proxy
IHttpRequestNodeBuilder proxy(String host, int port)
Sets up a proxy for transmitting the HTTP request.- Parameters:
host
- Host of the proxy.port
- Port of the proxy.- Returns:
- This builder for chaining methods calls.
-
proxy
IHttpRequestNodeBuilder proxy(String host, int port, String username, String password)
Sets up a proxy for transmitting the HTTP request.- Parameters:
host
- Host of the proxy.port
- Port of the proxy.username
- Username for authorizing against the proxy.password
- Password for authorizing against the proxy.- Returns:
- This builder for chaining methods calls.
-
readTimeout
IHttpRequestNodeBuilder readTimeout(TimeDuration readTimeout)
- Parameters:
readTimeout
- Maximum time to wait for a response from the server.- Returns:
- This builder for chaining methods calls.
-
sendAllFormValues
IHttpRequestNodeBuilder sendAllFormValues(boolean sendAllFormValues, boolean useFieldAlias)
- Parameters:
sendAllFormValues
- Whether to send the values of all form fields as form parameters with the HTTP request.useFieldAlias
- Whentrue
, uses the alias of a form element instead of its name.- Returns:
- This builder for chaining methods calls.
-
singleFileToTransmit
IHttpRequestNodeBuilder singleFileToTransmit(SingleFile singleFileToTransmit)
- Parameters:
singleFileToTransmit
- For therequest type
EHttpRequestType.FILE
, the file to send as the body of the HTTP request.- Returns:
- This builder for chaining methods calls.
-
treat4xxAsNormal
IHttpRequestNodeBuilder treat4xxAsNormal(boolean treat4xxAsNormal)
Lets you decide whether HTTP status codes in the 400-499 range are treated as errors.- Parameters:
treat4xxAsNormal
- Whentrue
, treats responses with 4xx status codes as normal. Whenfalse
, throws an error instead (the default behavior).- Returns:
- This builder for chaining methods calls.
-
treat5xxAsNormal
IHttpRequestNodeBuilder treat5xxAsNormal(boolean treat5xxAsNormal)
Lets you decide whether HTTP status codes in the 500-599 range are treated as errors.- Parameters:
treat5xxAsNormal
- Whentrue
, treats responses with 5xx status codes as normal. Whenfalse
, throws an error instead (the default behavior).- Returns:
- This builder for chaining methods calls.
-
xslTemplate
IHttpRequestNodeBuilder xslTemplate(Textbaustein xslTemplate)
- Parameters:
xslTemplate
- Optional XSL template for transforming the received response.- Returns:
- This builder for chaining methods calls.
-
-