Simple-HTTP-Server

时间:2021-04-01 03:14:32
【文件属性】:
文件名称:Simple-HTTP-Server
文件大小:223KB
文件格式:ZIP
更新时间:2021-04-01 03:14:32
Python 简单的HTTP服务器 一个基于TCP协议的简单http服务器 实现一个简易的Web服务器,提供两个HTTP接口: POST / ping接受body参数名称,返回200状态码,原样输出名称 GET / now返回200状态码,输出当前最大化 对于其他访问,返回404状态码 提示:除了功能本身的实现之外,检查评估范围还包括边缘情况的处理,代码风格,性能考量等。 实现完成后的效果如下: $ curl -X POST -d'name = hello%20world'http: 8000/ping您好,世界您好 $ curl -X POST -d'foo = bar&name = hello%20world'http: 8000/ping您好,世界您好 $ curl 1610085139 $ curl 找不到页面
【文件预览】:
Simple-HTTP-Server-main
----server()
--------__pycache__()
--------base_http_server.py(297B)
--------socket_server.py(1KB)
--------http_server.py(467B)
----handler()
--------__pycache__()
--------base_handler.py(1KB)
--------__init__.py(0B)
--------base_http_handler.py(7KB)
--------http_handler.py(1KB)
----Reference Material()
--------server()
--------handler()
--------socket()
--------test()
--------实现HTTP服务器.xmind(71KB)
--------util.py(528B)
--------resources()
----LICENSE(1KB)
----.DS_Store(8KB)
----README.md(832B)
----.gitattributes(66B)
----Test.md(323B)

网友评论