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