summaryrefslogtreecommitdiff
path: root/examples/headers.sh
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-07-02 22:15:24 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-07-02 22:15:24 -0400
commit41fe16978ea506127bf43c21e977fd9581d87282 (patch)
treeb5bf1ef7a37404350d45f0b6e8a00c5b32216e08 /examples/headers.sh
parentmore info (diff)
downloadbashttp-41fe16978ea506127bf43c21e977fd9581d87282.tar.gz
bashttp-41fe16978ea506127bf43c21e977fd9581d87282.tar.bz2
bashttp-41fe16978ea506127bf43c21e977fd9581d87282.zip
add methods to routes, allow custom headers and response codes
Diffstat (limited to 'examples/headers.sh')
-rwxr-xr-xexamples/headers.sh11
1 files changed, 11 insertions, 0 deletions
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