String to stream
Description
Pure function wrapping a string as an output stream using the selected charset. Use to pipe a literal string into a node that expects an output stream (e.g. an HTTP request body).
When to use
Use String to stream when you need to supply a string as the body of an HTTP
request. The HTTP request node accepts an output stream for its body input so that
large payloads can be streamed without buffering — String to stream bridges the gap
for literal or dynamically constructed string bodies. Build your request payload
using string nodes such as Concatenate strings or Replace, then wrap the
result with String to stream before wiring it into http-request.body.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Input | string | — | The string to wrap as a stream. The bytes written to the stream are the string encoded in the selected charset. |
| Charset | Character set | UTF-8 | The character encoding to use when writing the string bytes. Must match the charset expected by the downstream consumer. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Stream | Output stream | An output stream that, when consumed, writes the encoded string bytes. |
Example
POST a JSON payload built from pipeline data to an external webhook. Build the payload
using Replace or Concatenate strings, then wire the Result output into the Input of
String to stream (Charset set to UTF-8). Feed the Stream output directly into the
Body input of HTTP request (Method set to POST), avoiding any intermediate buffering
of the payload.