Resty 入门
lacation
funciton | 含义 | 备注 |
---|---|---|
ngx.req.get_uri_args | 获取参数 | |
ngx.req.get_post_args | 获取post参数 | |
ngx.location.capture | ||
ngx.location.capture_multi | 子请求 | local res1, res2 = ngx.location.capture_multi({ {"/sum", {args={a=3, b=8}}} |
ngx.exec | 内部跳转 | |
ngx.redirect | 外部重定向 | |
ngx.encode_args | 转义 | |
ngx.req.get_body_data | 获取body | lua_need_request_body on; |
ngx.req.read_body | 非全局获取body | |
ngx.req.get_body_file | 已存入临时文件时,通过该方法获取 |
来源:oschina
链接:https://my.oschina.net/guopei/blog/3188696