nginx模块开发获取post参数
2014-12-21 22:02
2783 查看
> 您好!
> 我想请问下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参数,能有具体的代码更好!谢谢
>
对于 "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的C模块代码实现获取POST请求参数并回传给客户端
- nginx模块开发-在handle函数中获取页面请求的参数
- nginx自定义模块编写-根据post参数路由到不同服务器
- nginx模块开发 post请求处理
- nginx自定义模块编写-根据post参数路由到不同服务器
- Nginx自定义模块编写:根据post参数路由到不同服务器
- Nginx服务器中使用lua获取get或post参数
- Nginx自定义模块编写:根据post参数路由到不同服务器
- nginx源码初读(12)--跟main一起看流程(Block 1: 初始化基础模块 Block 2:获取参数)
- OS开发之AFNetworking-解决Servlet用request.getParameter("")无法获取到post参数的问题
- lua在web开发中获取GET或POST参数
- nginx自定义模块编写-根据post参数路由到不同服务器
- nginx自定义模块编写-根据post参数路由到不同服务器
- Nginx自定义模块编写:根据post参数路由到不同服务器
- Nginx模块开发-获取用户ip
- Nginx自定义模块编写:根据post参数路由到不同服务器
- nginx的http模块开发--一个验证url参数的例子
- Nginx自定义模块编写:根据post参数路由到不同服务器
- lua在web开发中获取GET或POST参数
- 在ASP.NET中获取参数POST和GET方式提交的参数