From cc281c0646257ed6b37cec3549041bf74dcc1f06 Mon Sep 17 00:00:00 2001 From: liuxiran Date: Thu, 7 Jan 2021 15:57:24 +0800 Subject: [PATCH] fix: get and head request did not contain bodyparams --- web/src/pages/Route/components/DebugViews/DebugDrawView.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/pages/Route/components/DebugViews/DebugDrawView.tsx b/web/src/pages/Route/components/DebugViews/DebugDrawView.tsx index 18b3d0e66d..daf516d097 100644 --- a/web/src/pages/Route/components/DebugViews/DebugDrawView.tsx +++ b/web/src/pages/Route/components/DebugViews/DebugDrawView.tsx @@ -81,6 +81,9 @@ const DebugDrawView: React.FC = (props) => { let transformDataForm: string[]; let transformDataJson: object; const formData: RouteModule.debugRequestParamsFormData[] = bodyForm.getFieldsValue().params; + if (methodWithoutBody.includes(httpMethod)) { + return undefined + } switch (bodyType) { case 'x-www-form-urlencoded': transformDataForm = (formData || [])