tarantool / nginx_upstream_module

Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)
Other
174 stars 18 forks source link

Parsing POST request #77

Closed fsitedev closed 4 years ago

fsitedev commented 7 years ago

As a continuation of the issue https://github.com/tarantool/nginx_upstream_module/issues/76 I can suggest to parse the POST body and transfer resulting arguments into lua procedure. It seems quite logical for modern web application to have such common things like request headers, GET-POST params and etc. not only in raw form but in commonly-used parsed variant. As an Idea I can suggest to alter some options of "tnt_pass_http_request" directive:

So as not to die from so much work, we can start from only one encoding and add others one by one. I'm sure this feature will make "tnt/nginx_upstream" much more convinient for end-level lua applications, which still suffer from heavy text-parsing tasks and will let them focus on it's logic only

dedok commented 7 years ago

x-www-urlencoded (default if skipped) in 1f057360b6a2425e31bd15fe890397e49687d748

dedok commented 7 years ago

You can found details in readme, here is a link https://github.com/tarantool/nginx_upstream_module#tnt_pass_http_request, check the parse_urlencoded

snoopcatt commented 4 years ago

Added pull request that allow access to raw POST body even with parse_urlencoded enabled. In my branch with parse_urlencoded there are new request variable — args_urlencoded, and you still have access to raw body value.

dedok commented 4 years ago

Yeah, I guess we can close this one. Thank you so much!