billtsu / everydaylearning

每日小结
0 stars 0 forks source link

cgi 服务器的bug #2

Open billtsu opened 6 years ago

billtsu commented 6 years ago

1.编写restful服务器时,使用到simplehttpserver,其中3.4里面的某个版本以前的cgi.py文件存在bug,无法吹bytes类型的数据,已经修复,这个地方要注意下 2.从本质上来说restful服务器和socket服务器是没有区别的,,,,socket服务器只用再返回值前面添加标准的响应头,Ok 错误码 key:value,就可以变成restful服务器格式了,这个地方要注意下

billtsu commented 6 years ago

http://www.pythondoc.com/flask-restful/first.html flask and restful http://python3-cookbook.readthedocs.io/zh_CN/latest/c11/p05_creating_simple_rest_based_interface.html very good example

billtsu commented 6 years ago

http://www.tawqt.com/RESTPython.pdf 这个里面有很多有用的转化方法