I am currently using the request_body_var plugin with Caddy to handle requests and extract variables from the request body. However, I've encountered an issue where the plugin does not support requests with the application/x-www-form-urlencoded content type. This is a common content type used in many web forms and handling this correctly is crucial for many server-side applications.
Error Details:
When attempting to retrieve a variable from a request body with the content type application/x-www-form-urlencoded, the plugin fails to initialize the querier and logs the following error:
{"level":"error","ts":1726639454.9856362,"logger":"http.handlers.request_body_var","msg":"failed to new querier","key":"Username","error":"unsupported Media Type: \"application/x-www-form-urlencoded\""}
This indicates that the current implementation does not support parsing application/x-www-form-urlencoded content types.
This indicates that the current implementation does not support parsing application/x-www-form-urlencoded content types.
Expected Behavior:
The plugin should be able to handle application/x-www-form-urlencoded content type by parsing the request body and allowing extraction of specified keys, similar to how it handles JSON and XML.
I am currently using the request_body_var plugin with Caddy to handle requests and extract variables from the request body. However, I've encountered an issue where the plugin does not support requests with the application/x-www-form-urlencoded content type. This is a common content type used in many web forms and handling this correctly is crucial for many server-side applications.
Error Details: When attempting to retrieve a variable from a request body with the content type application/x-www-form-urlencoded, the plugin fails to initialize the querier and logs the following error:
This indicates that the current implementation does not support parsing application/x-www-form-urlencoded content types.
Expected Behavior: The plugin should be able to handle application/x-www-form-urlencoded content type by parsing the request body and allowing extraction of specified keys, similar to how it handles JSON and XML.