On this page
Answer Content
Example
---
rules:
- name: Single Line
on:
path: /content/1
methods:
- get
answer.content: Hello World
- name: Multi-Line
on:
path: /content/2
methods:
- post
answer.content: |
Line 1
Line 2
{{ .Input.Form.Text }}
To see it in action, execute requests as follows:
$ curl localhost:3000/content/1
Hello World
$ curl localhost:3000/content/2 -F Text="Hello World"
Line 1
Line 2
Hello World
Read more about how to use placeholders.