msabramo / requests-unixsocket

Use requests to talk HTTP via a UNIX domain socket
Apache License 2.0
207 stars 29 forks source link

Add examples/simple-http.py #32

Closed msabramo closed 7 years ago

msabramo commented 7 years ago

Sort of like a very simple HTTPie

e.g.:

$ examples/simple-http.py http+unix://%2Fvar%2Frun%2Fdocker.sock/version
{"Version":"1.12.3","ApiVersion":"1.24","GitCommit":"6b644ec","GoVersion":"go1.6.2","Os":"linux","Arch":"amd64","KernelVersion":"4.4.0-63-generic","BuildTime":"Mon, 19 Dec 2016 09:20:48 +1300"}