Thank you Yichun,
I was able to post the parameter from nginx by passing the arguments using this.
local maken_res = ngx.location.capture("/test", { method = ngx.HTTP_POST, args = { pagelayout = dev_res_encoded }});
This works only when post parameter size is less than 81568 characters. When the parameter size is greater than 81568, we get error 502.
is there any way to get around this limitation or is there a different way to post more than 81568 characters.
Jyoti