-
Notifications
You must be signed in to change notification settings - Fork 9
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
Look into supporting nicer URL syntax of curl-unix-socket #8
Comments
Sounds good, anything needed from HTTTPie? |
@jkbrzt: Question: Is it possible for an HTTPie transport plugin to support multiple prefixes? E.g.: class UnixSocketTransportPlugin(TransportPlugin):
name = 'UNIX socket transport'
prefix = ['http://sock.local/', 'http+unix://']
def get_adapter(self):
return UnixAdapter() Because I have a new scheme that I'm playing with, but I thought it would be nice to support the old prefix too. Though maybe I shouldn't worry too much about it, since the version number is < 1 and thus arguably, people should be willing to accept breaking changes. |
@msabramo the plugin API currently only supports one prefix per plugin. But you could, for example, expose two plugins (differing only in the prefix) in entry_points={
'httpie.plugins.transport.v1': [
'httpie_unixsocket = httpie_unixsocket:UnixSocketTransportPlugin',
'httpie_unixsocket_legacy = httpie_unixsocket:LegacyUnixSocketTransportPlugin',
]
}, |
you can't use sock.local
you need to use a subdomain of your own domain name. |
@jkbrzt: Thanks! Yeah that's what I was starting to think of as well after I posted my comment. Not a bad option. Although I might end up not needing it, because folks seem to be wanting to keep the |
Note: I have begun working on this in msabramo/requests-unixsocket#34 |
Thanks, @graingert! Yeah a few people have mentioned that; I wasn't aware that |
Inspired by issue #7, as I think the current syntax is ugly and too error-prone.
Cc: @jakubroztocil, @jfrazelle
The text was updated successfully, but these errors were encountered: