You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/02 07:00:54 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #3556: feat: support rewrite HTTP method

spacewander commented on a change in pull request #3556:
URL: https://github.com/apache/apisix/pull/3556#discussion_r606101677



##########
File path: t/plugin/proxy-rewrite.t
##########
@@ -1370,3 +1370,100 @@ host: test.com:6443
 x-real-ip: 127.0.0.1
 --- no_error_log
 [error]
+
+
+
+=== TEST 47: set route(rewrite HTTP method)
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/routes/1',
+                 ngx.HTTP_PUT,
+                 [[{
+                        "methods": ["GET"],
+                        "plugins": {
+                            "proxy-rewrite": {
+                                "method": "POST"
+                            }
+                        },
+                        "upstream": {
+                            "nodes": {
+                                "127.0.0.1:1980": 1
+                            },
+                            "type": "roundrobin"
+                        },
+                        "uri": "/hello"

Review comment:
       We need to add a new method in `https://github.com/apache/apisix/blob/master/t/lib/server.lua` to echo the proxied HTTP method and check the response




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org