Kong / Kong/httpsnippet

FEATURE REQUEST: add proxy option when generating client code

未關閉
#370 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
1.2k
分支
242
PR 合併指標
30 天內沒有已合併 PR

描述

i d like to add a feature that when importing a curl request it recognizes proxy header in curl --socks5-hostname and generates client code with proxy in it.

example
input
```curl --socks5-hostname localhost:9050 https://example.com```

output
```
import requests

url = "https://example.com"
payload = ""
headers = {}
proxies = {
'http': 'socks5://localhost:9050',
'https': 'socks5://localhost:9050',
}

response = requests.request("GET", url, data=payload, headers=headers, proxies=proxies)
```

貢獻指南

開啟貢獻指南

研究方向

Start by tracing how curl imports are parsed and how the Python requests client output is generated. Reproduce the shown --socks5-hostname input, then verify that the generated requests code includes the proxy configuration while preserving the existing URL and request details. No file or test is named in the issue.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, typescript
領域
tooling
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。