From 7c87dc0b1adbe03048c69e2ccdb4a245963fbcd0 Mon Sep 17 00:00:00 2001 From: germondai Date: Mon, 6 Jul 2026 01:12:06 +0200 Subject: [PATCH] feat(types): support full HTTP method set and rename postData to body --- packages/types/src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 90f2e61..b163465 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -16,8 +16,11 @@ export interface ScrapeRequest { maxTier?: 1 | 2 | 3 | 4 sessionId?: string headers?: Record - method?: string - postData?: string + // CONNECT is intentionally excluded — it's a tunneling verb, not a normal + // request body, and would let a caller establish arbitrary TCP tunnels. + // QUERY (RFC 9341) is included — safe verb, body carries the query params. + method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE" | "QUERY" + body?: string } export interface TierResult {