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

feat: support custom http scheme #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ritajie
Copy link

@ritajie ritajie commented Sep 30, 2021

If you use a custom http scheme (like http-custom://aaa.bbb.ccc/path) and use your custom HTTPConnectionPool to parse it to generate a http connection, to_curl will give you inappropriate result:

resp = requests.get("http-custom://microservice.address/api/path")
curlify.to_curl(resp.request)  # curl -X GET http-custom://microservice.address/api/path

I created to_raw_http_curl to solve this kind of problem:

resp = requests.get("http-custom://microservice.address/api/path")
curlify.to_raw_http_curl(resp)  # curl -X GET http://11.22.33.44:80/api/path

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

Successfully merging this pull request may close these issues.

None yet

1 participant