首页 > 代码库 > nginx模块开发获取post参数
nginx模块开发获取post参数
> 您好!
> 我想请问下nginx模块里面怎么获取post参数,能有具体的代码更好!谢谢
>
对于 "application/x-www-form-urlencoded" 格式的 POST 参数获取,可以参考 ngx_lua 模块的
ngx.req.get_post_args() 函数以及 ngx_form_input 模块的实现:
http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_args
https://github.com/calio/form-input-nginx-module
而对于 "multipart/form-data" 格式的 POST 参数获取,可以参考 ngx_upload 模块以及 lua-resty-upload 库:
http://www.grid.net.ru/nginx/upload.en.html
https://github.com/agentzh/lua-resty-upload
Best regards,
-agentzh
nginx模块开发获取post参数
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。