Below are CURL calls you can make to connect to a running API using the provided example.
Accesses the root endpoint (GET /) which is just a PING to verify the server is up.
curl --location --request GET 'http://localhost:8000/'
Accesses the POST /echo endpoint, passing a message, which is returned back the client.
curl --location --request POST 'http://localhost:8000/echo' \
--header 'Content-Type: application/json' \
--data-raw '{
"echoMessage": "Hi there.",
"outputTimestamp": true
}'
Accesses the POST /echo_secured endpoint passing an ApiKey. Other than requiring an apikey header, this endpoint does the same as /echo.
curl --location --request POST 'http://localhost:8000/echo_secured' \
--header 'apikey: abc123' \
--header 'Content-Type: application/json' \
--data-raw '{
"echoMessage": "Hi there.",
"outputTimestamp": true
}'