mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: quick-starts: api: Remove tabs from heredoc (#43)
This commit is contained in:
parent
9594e4bc4b
commit
68e003409a
1 changed files with 20 additions and 20 deletions
|
@ -17,28 +17,28 @@ First start Caddy:
|
|||
Caddy is currently running idle (with a blank configuration). Give it a simple config with `curl`:
|
||||
|
||||
<pre><code class="cmd bash">curl localhost:2019/load \
|
||||
-X POST \
|
||||
-X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @- << EOF
|
||||
{
|
||||
"apps": {
|
||||
"http": {
|
||||
"servers": {
|
||||
"hello": {
|
||||
"listen": [":2015"],
|
||||
"routes": [
|
||||
{
|
||||
"handle": [{
|
||||
"handler": "static_response",
|
||||
"body": "Hello, world!"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"apps": {
|
||||
"http": {
|
||||
"servers": {
|
||||
"hello": {
|
||||
"listen": [":2015"],
|
||||
"routes": [
|
||||
{
|
||||
"handle": [{
|
||||
"handler": "static_response",
|
||||
"body": "Hello, world!"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF</code></pre>
|
||||
|
||||
Giving a POST body with [Heredoc](https://en.wikipedia.org/wiki/Here_document#Unix_shells) can be tedious, so if you prefer to use files, save the JSON to a file called `caddy.json` and then use this command instead:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue