Here is what i have so far:
#!/bin/bash
if [ "$REQUEST_METHOD" = "POST" ]; then
if [ "$CONTENT_LENGTH" -gt 0 ]; then
read -n $CONTENT_LENGTH POST_DATA <&0
fi
fi
I was told that with this script when you receive post request to http://127.0.0.1./test.sh it will read the post data. However when i try to make post request to this file i see it's content and nothing else is happening.
Is it even possible to receive HTTP POST request to /bin/bash/ script file and if so how ?