Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE REQUEST: add proxy option when generating client code #370

Open
sbOogway opened this issue Sep 28, 2024 · 0 comments
Open

FEATURE REQUEST: add proxy option when generating client code #370

sbOogway opened this issue Sep 28, 2024 · 0 comments

Comments

@sbOogway
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant