文件名称:http:Pixie的HTTP服务器
文件大小:5KB
文件格式:ZIP
更新时间:2024-06-14 04:57:17
Python
HTTP pixie的基本http服务器。 用法 ( ns skynet.core ( :require [http.server :as server])) ( defn my-handler [req] ( println " Received a request " ) { :status 200 :phrase " OK " :protocol " HTTP/1.1 " :body ( str "
You are visiting " ( req :location ) "
" )}) ( server/start " 127.0.0.1 " 4000 my-handler) 处理程序是一个接受请求映射并返回响应映射的函数。 请求映射包含:location , :method , :protocol和:headers键【文件预览】:
http-master
----project.edn(92B)
----src()
--------http()
----LICENSE(7KB)
----examples()
--------simple.pxi(246B)
----README.md(776B)