docs: quick-starts: api: Remove tabs from heredoc (#43)

This commit is contained in:
John Andersen 2020-05-17 08:46:31 -07:00 committed by GitHub
parent 9594e4bc4b
commit 68e003409a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: