# Generate Form Body

> Generate a HTTP form body from a list of key-value pairs.

- ID: `generate_form_body`
- Type: Block
- Category: [Network](https://inventor.bot/docs/reference/blocks/network.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `values` | yes | Key-value pairs separated by new lines (key=value). | e.g. `"username=john\nage=25"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `form_body` | URL-encoded form body. | e.g. `"username=john&age=25"` |

**Example**

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