From 92d636b88e9be2d5d1f20fbe5dfc5baf077522dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B1=B3=E6=B4=9B?= <619434176@qq.com> Date: Wed, 31 Jan 2024 23:50:38 +0800 Subject: [PATCH] fix: extract header bug --- app/core/paramters/parser.py | 2 +- app/core/paramters/status_code_parser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/paramters/parser.py b/app/core/paramters/parser.py index 1c838c91..8ff22a36 100644 --- a/app/core/paramters/parser.py +++ b/app/core/paramters/parser.py @@ -29,4 +29,4 @@ def parse_result(data: list, match_index: str = None): if match_index.lower() == 'all': return data raise CaseParametersError(f"invalid match index: {match_index}, not number or random") - return data + return data[0] diff --git a/app/core/paramters/status_code_parser.py b/app/core/paramters/status_code_parser.py index 3e55d19b..4a86c88c 100644 --- a/app/core/paramters/status_code_parser.py +++ b/app/core/paramters/status_code_parser.py @@ -6,4 +6,4 @@ class StatusCodeParser(Parser): @staticmethod def parse(source: dict, expression: str = "", idx: str = None) -> str: - return json.dumps(source.get("status_code")) + return source.get("status_code")