Usually, doing a post request using requests framework is done by:
payload = {'key1': 'value1', 'key2': 'value2'}
r = requests.post("http://httpbin.org/post", data=payload)
But: How do I connect to a unix socket instead of doing a TCP connection?
On a related note, how to encode domain path in the URL?
- libcurl allows application to supply own socket on which to perform request
- LDAP invented own scheme
ldapi
where socket name is %-encoded in host field httpie
useshttp+unix
scheme and %-encoded path in host field
These are some examples, but is there an RFC or established best practice?