/
appendToWebhookResponse
appendToWebhookResponse
Description
Adds an object to the response that will be returned to the Webhook caller, as the HTTP body.
Parameters
Return Type
None
Example
//getting the REST/HTTP call input parameters:
WebhookPayload httpRequestPayload = getWebhookPayload();
//getting the used HTTP method:
string httpMethod = httpRequestPayload.httpMethod;//This can be something like "GET", "POST", "PUT" etc.
//getting the http request payload (body):
string httpPayload = httpRequestPayload.payload;
//getting the http query parameters:
WebhookParam[] httpQueryParams = httpRequestPayload.queryParams;
string firstQueryParamName = httpQueryParams[0].name;
string firstQueryParamValue = httpQueryParams[0].values[0];
//sending the response back to the caller:
appendToWebhookResponse("http method:");
appendToWebhookResponse(httpMethod);
appendToWebhookResponse("payload:");
appendToWebhookResponse(httpPayload);
appendToWebhookResponse("firstQueryParamName:");
appendToWebhookResponse(firstQueryParamName);
appendToWebhookResponse("firstQueryParamValue:");
appendToWebhookResponse(firstQueryParamValue);
//returning a custom HTTP status code:
return true, 1234;
If the responsePart parameter has another type but string, a conversion to string will be attempted.
See also
, multiple selections available,
Related content
Predefined structure types reference
Predefined structure types reference
Read with this
appendToWebhookResponse
appendToWebhookResponse
More like this
Webhooks
Webhooks
Read with this
appendToWebhookResponse
appendToWebhookResponse
More like this
Web Hook Configuration (PS)
Web Hook Configuration (PS)
Read with this
getWebhookPayload
getWebhookPayload
More like this