summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-07-02 22:40:04 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-07-02 22:40:04 -0400
commit77eee644c9c9bf6e3c19a5c6efb9d31f5d91318e (patch)
tree9e8ef5086cb7e30057ead2a78b0347bf3341ce46 /README.md
parentadd methods to routes, allow custom headers and response codes (diff)
downloadbashttp-77eee644c9c9bf6e3c19a5c6efb9d31f5d91318e.tar.gz
bashttp-77eee644c9c9bf6e3c19a5c6efb9d31f5d91318e.tar.bz2
bashttp-77eee644c9c9bf6e3c19a5c6efb9d31f5d91318e.zip
move body to stdin
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 8ba0773..e6b7580 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ printf "joe\n"
exit 200
```
-Finally if you wish to read the request body given by the user, that is always stored in argument 1. For example to create a echo endpoint:
+Finally if you wish to read the request body given by the user, that is always stored in stdin. For example to create a echo endpoint:
```sh
#!/bin/bash
@@ -46,8 +46,8 @@ Finally if you wish to read the request body given by the user, that is always s
# 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"
+# the body of any http request made will be stored in stdin
+cat
exit 200
```