主要应对场景是cookie由另外独立机制单独生成,不需要自动生成的场景。
依赖环境如下
python>=3.0requests>=2.13.0redis>=2.10.5Flask>=0.12.10环境初始化脚本chmod+xinstall.shshinstall.sh配置[uwsgi]http=:8080wsgi-file=run.pycallable=appprocesses=2threads=50master=truepidfile=coopool.pid运行开发环境:python3run.py生产环境:uwsgi-d--inicoopool.ini接口restfull接口,响应格式如下:
{"status":"1","msg":"成功","data":1}status:状态1成功0失败msg:状态说明data:响应数据,根据不同接口数据类型不同
注册POST https://host:port/<website>/register参数:
{"validate_url":"https://host:port/index","alert_email":"a@c.com.b@d.com"}添加POST https://host:port/<website>/add参数:
{"cookie":"_ga=GA1.2.2068545466.1534464283;xn_dvid_kf_20049=2FB1BB-5425381E-C994-6182-6357-5EC6070D830D;JSESSIONID=node01pvm6qovnp0o0126xk4nvddbm7384.node0"}获取GET https://host:port/<website>/random
统计GET https://host:port/<website>/count
评论