-
Hi, If I have a http_client output, is it possible to modify the response before returning it to the caller? For example, in the following config, can I add a processor after the propagate_response so I can mutate the http_client response before returning it?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @nunodpalves you'd need to rework your flow so that instead of an In order to preserve delivery guarantees you'll want to follow this pattern for running processors as your output: https://www.benthos.dev/docs/components/processors/about#using-processors-as-outputs, and that'll ensure that if the processors fail you'll get either nacks or retries depending on your input. |
Beta Was this translation helpful? Give feedback.
Hey @nunodpalves you'd need to rework your flow so that instead of an
http_client
output you use anhttp
processor, followed by whichever processors you want to use to modify the response, then follow it with a sync response processor: https://www.benthos.dev/docs/components/processors/sync_response.In order to preserve delivery guarantees you'll want to follow this pattern for running processors as your output: https://www.benthos.dev/docs/components/processors/about#using-processors-as-outputs, and that'll ensure that if the processors fail you'll get either nacks or retries depending on your input.