Class RestFunctions
java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.RestFunctions
Utility functions used for making REST calls
- Since:
- 5.4
-
Field Summary
FieldsFields inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
mFLOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()intForwards a FlexDeploy Event via a POST request to another url, essentially making it a webhook.FlexRESTClientReturns a FlexRESTClient object which can be configured to make REST calls.Methods inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
captureSecureValues, captureSecureValuesForLogFunction, decryptIntegrationInstance, doSimpleGet, findIntegrationInstanceByCode, getBinding, getLogFunctions, getServerBaseUrl, setBinding
-
Field Details
-
GROOVY_KEY
- See Also:
-
-
Constructor Details
-
RestFunctions
-
-
Method Details
-
forward
Forwards a FlexDeploy Event via a POST request to another url, essentially making it a webhook. No authentication will be used as is normal for a webhook. If you need to forward with authentication or a different method you can usegetClient().- Parameters:
pUrl- The url to forward the request to.pPayload- The payload to forward, typically just the EVENT variable.- Returns:
- the response code of the REST call
- Throws:
FlexCheckedException- if the request fails
-
getClient
public FlexRESTClient getClient()Returns a FlexRESTClient object which can be configured to make REST calls.- Returns:
- FlexRESTClient
-
getGroovyKey
- Specified by:
getGroovyKeyin classBaseFunctions
-
cleanup
public void cleanup()- Specified by:
cleanupin classBaseFunctions
-