Interface IHttpRequestNodeBuilder
public interface IHttpRequestNodeBuilder
Builder for configuring a
EWorkflowNodeType.FC_POST_REQUEST
action.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionallowInvalidCertificates
(boolean allowInvalidCertificates) When connecting via HTTPS, sets whether to allow invalid certificates.asResponsePage
(boolean asResponsePage) attachToFormRecord
(boolean attachToFormRecord) Sets up basic authentication for the HTTP request.build()
Creates a new workflow node for aEWorkflowNodeType.FC_POST_REQUEST
that sends a HTTP request to the given URL.Creates a new model for a workflow action that sends a HTTP request to the given URL.connectTimeout
(TimeDuration connectTimeout) customBodyContent
(String customBodyContent) 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.disallowMessageBody
(boolean disallowMessageBody) Lets you decide whether a custom HTTP verb supports a message body.filesToTransmit
(MultiFile filesToTransmit) Includes an additional header in the HTTP request.httpBodyType
(EHttpRequestType httpBodyType) inputCharset
(String inputCharset) locationResolutionType
(EHttpLocationResolutionType locationResolutionType) When the HTTP response has a 3xx status code with aLocation
header, controls how to resolve the URI in that header.multipartHeaderType
(EMultipartHeaderType multipartHeaderType) outputCharset
(String outputCharset) outputFileName
(String outputFileName) Includes an additional form parameter in the HTTP request.parameters
(Map<String, List<String>> parameters) Includes additional form parameters to send with the HTTP request.Sets up a proxy for transmitting the HTTP request.Sets up a proxy for transmitting the HTTP request.readTimeout
(TimeDuration readTimeout) sendAllFormValues
(boolean sendAllFormValues, boolean useFieldAlias) singleFileToTransmit
(SingleFile singleFileToTransmit) treat4xxAsNormal
(boolean treat4xxAsNormal) Lets you decide whether HTTP status codes in the 400-499 range are treated as errors.treat5xxAsNormal
(boolean treat5xxAsNormal) Lets you decide whether HTTP status codes in the 500-599 range are treated as errors.xslTemplate
(Textbaustein xslTemplate)
-
Method Details
-
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
- 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
- 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
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
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
- Parameters:
connectTimeout
- Maximum time to wait when establishing a connection to the server.- Returns:
- This builder for chaining methods calls.
-
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
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
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
- Parameters:
filesToTransmit
- Files to transmit with the HTTP request (requires a multipart request, seehttpBodyType(EHttpRequestType)
).- Returns:
- This builder for chaining methods calls.
-
header
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
- 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
- Parameters:
httpBodyType
- How to create the content of the HTTP request body.- Returns:
- This builder for chaining methods calls.
-
inputCharset
- Parameters:
inputCharset
- Input character set, i.e. the encoding used for sending the HTTP request.- Returns:
- This builder for chaining methods calls.
-
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
- Parameters:
multipartHeaderType
- How to handle Unicode characters in headers of multipart HTTP requests.- Returns:
- This builder for chaining methods calls.
-
outputCharset
- Parameters:
outputCharset
- Output character set, e.g. the expected encoding of the response.- Returns:
- This builder for chaining methods calls.
-
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
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
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
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
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
- Parameters:
readTimeout
- Maximum time to wait for a response from the server.- Returns:
- This builder for chaining methods calls.
-
sendAllFormValues
- 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
- 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
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
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
- Parameters:
xslTemplate
- Optional XSL template for transforming the received response.- Returns:
- This builder for chaining methods calls.
-