![](/media/cache/group/ep_srxDLMd.webp.50x50_q85.jpg)
Beispiel HTTP GET
Dependencies: EthernetInterface mbed-rtos mbed
Fork of HTTP_GET by
Diff: cgi-bin/rest.txt
- Revision:
- 8:7d8db739ea8c
- Parent:
- 7:9e64ad8d11e7
diff -r 9e64ad8d11e7 -r 7d8db739ea8c cgi-bin/rest.txt --- a/cgi-bin/rest.txt Mon Jun 08 15:30:08 2015 +0000 +++ b/cgi-bin/rest.txt Fri Dec 11 18:12:29 2015 +0000 @@ -37,12 +37,12 @@ IFS=$saveIFS echo "append to http://`hostname`/data/post.txt" - printf "${REMOTE_ADDR} `date "+%Y.%m.%d %H:%M:%S"` " >>/var/www/data/post.txt + printf "${REMOTE_ADDR} `date "+%Y.%m.%d %H:%M:%S"` " >>/var/www/html/data/post.txt for (( index = 0; index < ${#parm[@]}; index += 2 )) do - printf "${parm[index]} = ${parm[index+1]} " >>/var/www/data/post.txt + printf "${parm[index]} = ${parm[index+1]} " >>/var/www/html/data/post.txt done - printf "\n" >>/var/www/data/post.txt + printf "\n" >>/var/www/html/data/post.txt fi # @@ -51,7 +51,7 @@ if [ "$REQUEST_METHOD" = "PUT" ] then echo "write to http://`hostname`/data/$QUERY_STRING" - cat - >/var/www/data/$QUERY_STRING + cat - >/var/www/html/data/$QUERY_STRING fi # @@ -60,5 +60,5 @@ if [ "$REQUEST_METHOD" = "DELETE" ] then echo "delete http://`hostname`/data/$QUERY_STRING" - rm -f /var/www/data/$QUERY_STRING + rm -f /var/www/html/data/$QUERY_STRING fi