Kong / Kong/httpsnippet

FEATURE REQUEST: add proxy option when generating client code

Aperta
#370 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
1.2k
Fork
242
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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)
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, typescript
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.