fix: http method can be upper case and lower case close #11877 (#12401)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong
2025-01-06 20:35:53 +08:00
committed by GitHub
parent 34519de3b7
commit fe26be2312
3 changed files with 66 additions and 6 deletions

View File

@@ -202,8 +202,23 @@ class ApiTool(Tool):
else:
body = body
if method in {"get", "head", "post", "put", "delete", "patch"}:
response: httpx.Response = getattr(ssrf_proxy, method)(
if method in {
"get",
"head",
"post",
"put",
"delete",
"patch",
"options",
"GET",
"POST",
"PUT",
"PATCH",
"DELETE",
"HEAD",
"OPTIONS",
}:
response: httpx.Response = getattr(ssrf_proxy, method.lower())(
url,
params=params,
headers=headers,