ngx.req.append_body
ngx.req.set_body_data
之类吧
On Jan 15, 5:44 am, lhmwzy <lhm...@gmail.com> wrote:
> 谢谢回答
> 那假如我想访问/pcre1,POST提交到/pcre2一个名为"id"的args,值为"45",那如何在提交过程为,如何修改这个args的值?
>
> 在 2013年1月15日上午3:44,agentzh <agen...@gmail.com>写道:
>
>
>
>
>
>
>
> > Hello!
>
> > 2013/1/14 lhmwzy:
> > > 这个指令有啥用处?
> > > 有如下两个文件:
> > > pcre1
> > > ngx.req.set_method(ngx.HTTP_POST)
> > > ngx.req.set_uri_args("id=45")
> > > ngx.req.set_uri("/pcre2",true)
>
> > [...]
> > > 那么
>
> > ngx.req.set_method(ngx.HTTP_POST)这句的意思不就是把原来的GET方法改为POST方法吗?为什么/pcre2只取到了POST的方法,却没有POST到的参数?参数依然为GET方式
>
> > ngx.req.set_method() 仅仅是修改当前请求的请求方法,它并不会去自动调整 URL 或者 POST 参数。
>
> > ngx.req.set_uri_args() 设置的永远是 URL 参数,而不会是 POST 参数,正如其 API 名称所指示的那样。
>
> > Best regards,
> > -agentzh
>
> > e>