%% The request of POST
113 Form = mochiweb_request:parse_post(Req),
%% The request of GET
113 Form = mochiweb_request:parse_qs(Req),
%% The file upload
79 Form = mochiweb_multipart:parse_form(Req),
80 ?DEBUG("~p:~p sss length(Form)=~p", [?MODULE, ?LINE, length(Form)]),
81 Jid = proplists:get_value("jid", Form, ""),
%% download file
218 parse_request_get(Req, "file/get_small_avatar/"++Path, DocRoot) ->
219 NewPath="avatar/small/"++Path++".jpg",
220 Req:serve_file(NewPath, DocRoot);
113 Form = mochiweb_request:parse_post(Req),
114 ?DEBUG("~p:~p sss Form=~p", [?MODULE, ?LINE, Form]),
115 Username = proplists:get_value("username", Form, ""),
116 Password = proplists:get_value("password", Form, ""),
117 Type = proplists:get_value("type", Form, ""),
184 Req:ok({"text/html", [], <<"<html>
185 <head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
186 </head><body><h1>APK上传</h1>
187 <form enctype=\"multipart/form-data\" action=\"/upload/save_apk\" method=\"post\">
188 <label for=\"file\">版本号</label>
189 <input type=\"input\" name=\"version\" id=\"version\"/>
190 <label for=\"file\">描述</label>
191 <input type=\"input\" name=\"desc\" id=\"desc\"/>
192 <label for=\"file\">server</label>
193 <input type=\"input\" value='wx.com' name=\"server\" id=\"version\"/>
194 <input type=\"file\" name=\"file\" id=\"file\"/>
195 <input type=\"submit\" name=\"upload\" value=\"Upload\" />
196 </form>
197 </body></html>">>});
相关推荐
mochiweb实现的web服务器简单实例
erlang mochiweb-test demo .zip
MochiWeb 的最新版本可在MochiWeb 的邮件列表位于 设置 MochiWeb 环境需要 Erlang OTP,可在使用项目创建一个新的 mochiweb:make app PROJECT=project_name 要使用特定目录中的项目创建新的 mochiweb: make app ...
用erlang语言写的,基于mochiweb的聊天室代码
MochiWeb的邮件列表位于 R12B兼容性:MochiWeb的母版已通过R14A及更高版本进行了测试。 与R12B兼容的分支在单独维护。为方便起见,该存储库的R12B分支有时会在官方存储库中进行镜像。 要使用项目创建新的mochiweb,...
RPSSL彗星 RPSSL-Rock-Paper-Scissors-Spock-Lizard是一款简单但着名的2人游戏。 通常,它是第一人称自己玩的,但这是网络版本。 ... ... 因为它使用的资源很少,所以我们可以使其永远处于阻塞状态,并保持连接处于打开...
Webmachine 是一个应用层,为 mochiweb 提供 HTTP 语义的特性,定义一个简单而清晰的连接应用的方式。 标签:Webmachine Web框架
它目前支持Cowboy,Inet,Mochiweb,Webmachine和Yaws。 SimpleBridge用作两个最受欢迎的Erlang Web框架到Web服务器的桥梁: 和 从某种意义上讲,它类似于 ,除了具有一些关键的改进/不同之处: 轻松扩展-需要...
heroku-genfsmAn experimental Erlang app which deployed on HerokuSome Deploy Detail在 Heroku 上部署 Webmachine + Mochiweb + ErlyDTL 组合的 Erlang Web 应用
erlang web frame
核心功能目的:高性能协议中继端点:WebSocket,MQTT,TCP 代码库:700 LOC(Erlang),500 LOC(JavaScript) 透析仪:REBAR,REBAR3,MAD,MIX 主机:COWBOY,EMQ,MOCHIWEB,RING,TCP,UDP协议扩展模板:DTL,...
很棒的精选的Erlang框架,库和软件的精选列表。... 基于Erlang / OTP的分布式MQTT消息代理。... -Lisp风味Erlang(LFE) -Erlang Web MVC,现在具有Comet功能 -MochiWeb是用于构建轻量级HTTP服务器的Erlang库。
Webmachine是一个应用程序层,它在mochiweb提供的出色的按位和HTTP语法管理的基础上增加了HTTP语义意识,并提供了一种简单明了的方式将其连接到应用程序的行为。 可获得更多信息。 您还可以阅读有关Webmachine的...
很棒的网络刮板 支持 令人敬畏的Web scaper,爬虫的集合。 Java ...开源Web爬虫,建立在nosql数据库(apacheouchdb,riak),AMQP数据库(rabbitmq),webmachine和mochiweb之上。 Python scrap