nginx模塊開發獲取post參數

> 您好!
>     我想請問下nginx模塊裏面怎麼獲取post參數,能有具體的代碼更好!謝謝
>html

對於 "application/x-www-form-urlencoded" 格式的 POST 參數獲取,能夠參考 ngx_lua 模塊的
ngx.req.get_post_args() 函數以及 ngx_form_input 模塊的實現:nginx

    http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_argsgit

    https://github.com/calio/form-input-nginx-modulegithub

而對於 "multipart/form-data" 格式的 POST 參數獲取,能夠參考 ngx_upload 模塊以及 lua-resty-upload 庫:app

http://www.grid.net.ru/nginx/upload.en.html函數

https://github.com/agentzh/lua-resty-uploadpost

Best regards,
-agentzhgoogle

相關文章
相關標籤/搜索