summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/body.sh10
-rwxr-xr-xexamples/command.sh11
-rwxr-xr-xexamples/headers.sh11
3 files changed, 32 insertions, 0 deletions
diff --git a/examples/body.sh b/examples/body.sh
new file mode 100755
index 0000000..5c56df2
--- /dev/null
+++ b/examples/body.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# even though we have no headers
+# we still need to tell there will be no more headers
+printf "\n"
+
+# the body of any http request made will be stored in argument 1
+printf "$1"
+
+exit 200
diff --git a/examples/command.sh b/examples/command.sh
new file mode 100755
index 0000000..52a5666
--- /dev/null
+++ b/examples/command.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# even though we have no headers
+# we still need to tell there will be no more headers
+printf "\n"
+
+neofetch
+
+# return http code 418 im a teapot
+exit 418
+
diff --git a/examples/headers.sh b/examples/headers.sh
new file mode 100755
index 0000000..32c7a53
--- /dev/null
+++ b/examples/headers.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# print headers that will be returned
+printf "Content-Type: text/plain\n"
+printf "aaaaaaaa: AAAAAAAAAA\n"
+printf "\n"
+
+printf "joe\n"
+
+# return http code 200
+exit 200