代码拉取完成,页面将自动刷新
同步操作将从 ithewei/libhv 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
if [ ! -x bin/httpd -o ! -x bin/curl ]; then
make httpd curl
fi
processes=$(ps aux | grep -v grep | grep httpd | wc -l)
if [ $processes -lt 1 ]; then
bin/httpd -s restart -d
fi
ps aux | grep httpd
PS4="\033[32m+ \033[0m"
set -x
# http web service
read -n1
bin/curl -v localhost:8080
# http indexof service
read -n1
bin/curl -v localhost:8080/downloads/
# http api service
read -n1
bin/curl -v localhost:8080/v1/api/echo -d "hello,world!"
read -n1
bin/curl -v localhost:8080/v1/api/query?page_no=1\&page_size=10
read -n1
bin/curl -v localhost:8080/v1/api/kv -H "Content-Type:application/x-www-form-urlencoded" -d 'user=admin&pswd=123456'
read -n1
bin/curl -v localhost:8080/v1/api/json -H "Content-Type:application/json" -d '{"user":"admin","pswd":"123456"}'
read -n1
bin/curl -v localhost:8080/v1/api/form -F "user=admin pswd=123456"
read -n1
bin/curl -v localhost:8080/v1/api/upload -F "file=@LICENSE"
read -n1
bin/curl -v localhost:8080/v1/api/test -H "Content-Type:application/x-www-form-urlencoded" -d 'bool=1&int=123&float=3.14&string=hello'
read -n1
bin/curl -v localhost:8080/v1/api/test -H "Content-Type:application/json" -d '{"bool":true,"int":123,"float":3.14,"string":"hello"}'
read -n1
bin/curl -v localhost:8080/v1/api/test -F 'bool=1 int=123 float=3.14 string=hello'
# RESTful API: /group/:group_name/user/:user_id
read -n1
bin/curl -v -X DELETE localhost:8080/v1/api/group/test/user/123
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。