# HG changeset patch # User Christophe de Vienne <christophe@cdevienne.info> # Date 1651141001 -7200 # Thu Apr 28 12:16:41 2022 +0200 # Node ID e01b39b6cf6dce08c692fa6825b4c1cce891e1c5 # Parent 9c43c35237d56039bb7faa567e3fa8bf7477e8b3 Document the new webhook.payload-type setting diff --git a/source/http/webhook.rst b/source/http/webhook.rst --- a/source/http/webhook.rst +++ b/source/http/webhook.rst @@ -12,14 +12,52 @@ xbusctl actor config set <actor name> http.webhook.url=http<...> +The ``http.webhook.url`` may contain a "{msgtype}" placeholder that will be +replace by the message type. The value will be empty for ``full-request`` and +``envelope`` payload types + +.. versionadded:: 3.3.0 + - The *{msgtype}* placeholder + Additionnaly, the following settings can be customized: - ``http.webhook.content-type``: 'application/json' (default) or 'application/x-protobuf') + - ``http.webhook.http-codes.success``: A comma-separated list of http status - codes that should be interpreted as success. Default is "200". + codes that should be interpreted as success. Default is "200" for 'request' + payload types, and "204" for 'envelope' and 'content' payload types. + - ``http.webhook.http-codes.temporary-failure``: A comma-separated list of http status codes that should be interpreted as temporary failure, which imply - xbus reattempting until it gets a success or an error. Default is an empty list. + xbus reattempting until it gets a success or an error. Default is an empty + list. + +- ``http.webhook.payload-type``: Determines how to post the data to the target + url. The possible values are: + + - "full-request" (default): The full request is serialized and posted. The + reply body must be a proper ``ActorProcessingState``. + + - "envelope": post only the envelope and expects no content in return with a + 204 status. + + - "message-in-request": post individual messages in a request. The envelope + id is not changed. As with "full-request", the reply body must be a proper + ``ActorProcessingState``. + + - "message-in-envelope": post individual messages in an envelope. The envelope + id will be the same as the original envelope. The reply must be empty with + a 204 status code. + + - "message-content": post the messages raw contents, one by one, with the + configured content-type. The reply must be empty with a 204 status code. + + +.. versionadded:: 3.3.0 + + - The *http.webhook.payload-type* parameter. + + For example: