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_body

Inputs

FieldInventScript nameValue
Valuesvaluese.g. "username=john\nage=25"

Outputs

FieldInventScript nameValue
Form Bodyform_bodye.g. "username=john&age=25"

Example InventScript

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,
})

More network blocks