Welcome! Log In Create A New Profile

Advanced

Re: using location.capture to post a form

Yichun Zhang (agentzh)
September 16, 2014 02:52PM
Hello!

On Tue, Sep 16, 2014 at 11:24 AM, jpsonweb wrote:
> I am calling an webapplication from nginx. I want to capture the response
> and post the response body as a post parameter to another application.
> I am doing something like this
> local maken_res = ngx.location.capture("/test", { method = ngx.HTTP_POST
> ,body = "name = John"})
> The post goes through but receiving application does not get request
> parameter.
>

I think you also need to pass the request header "Content-Type:
application/x-www-form-urlencoded" to your subrequest because your
"receiving application" might require that.

Regards,
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

using location.capture to post a form

jpsonweb September 16, 2014 02:24PM

Re: using location.capture to post a form

Yichun Zhang (agentzh) September 16, 2014 02:52PM

Re: using location.capture to post a form

jpsonweb September 18, 2014 12:02PM

Re: using location.capture to post a form

Yichun Zhang (agentzh) September 18, 2014 01:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready