formBody := generate_form_body(Args{
values: `username=john
age=25`,
})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Form Body: " + formBody.form_body,
})
Generate Form Body
BlockNetwork
Generate a HTTP form body from a list of key-value pairs.
Inputs
ValuesRequired
Key-value pairs separated by new lines (key=value).
Example: username=john age=25
Outputs
Form Body
URL-encoded form body.
Example: username=john&age=25
Build a bot using blocks like Generate Form Body
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
generate_form_bodyInputs
| Field | InventScript name | Value |
|---|---|---|
| Values | values | e.g. "username=john\nage=25" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Form Body | form_body | e.g. "username=john&age=25" |
Example InventScript
More network blocks
Escape JSON FieldEscape a string to be used as a JSON field.Parse JSONRetrieve a value from a JSON string.Format JSONIndent a JSON string for readability.Network RequestSend an HTTP request and return the response.Respond to Incoming WebhookRespond to an incoming webhook request with a custom status code and response body.