Kong / Kong/httpsnippet

FEATURE REQUEST: add proxy option when generating client code

Open
#370 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.2k
Forks
242
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.