-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(ext-plugin): support to get request body #5600
Conversation
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
I'm thinking that this implementation might not be good enough, because usually the user needs to not only read the request body, but also rewrite it. |
@@ -169,6 +169,8 @@ function _M.go(case) | |||
local entry = call_req:Args(1) | |||
assert(entry:Name() == "x") | |||
assert(entry:Value() == "z") | |||
elseif case.get_request_body then | |||
assert(call_req:Method() == a6_method.POST) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check the request_body's value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to validate different content-type, so the value of request body is not fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions.result would check the value in request body?
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
dealy to merge, is: https://github.com/api7/ext-plugin-proto/blob/main/lua/A6/ExtraInfo/ReqBody.lua used for request body? |
ok, after review:https://lists.apache.org/thread/m5g44gtywx05x4s262rn7qg87oxscy0v, the ReqBody in ExtraInfo is used to holds the request body. |
I will update this PR. |
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Signed-off-by: tzssangglass tzssangglass@gmail.com
What this PR does / why we need it:
Pre-submission checklist: