summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mreiferson
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-08-06 21:47:05 +0200
committerWim <wim@42.be>2018-08-06 21:47:05 +0200
commit51062863a5c34d81e296cf15c61140911037cf3b (patch)
tree9b5e044672486326c7a0ca8fb26430f37bf4d83c /vendor/github.com/mreiferson
parent4fb4b7aa6c02a54db8ad8dd98e4d321396926c0d (diff)
downloadmatterbridge-msglm-51062863a5c34d81e296cf15c61140911037cf3b.tar.gz
matterbridge-msglm-51062863a5c34d81e296cf15c61140911037cf3b.tar.bz2
matterbridge-msglm-51062863a5c34d81e296cf15c61140911037cf3b.zip
Use mod vendor for vendored directory (backwards compatible)
Diffstat (limited to 'vendor/github.com/mreiferson')
-rw-r--r--vendor/github.com/mreiferson/go-httpclient/.gitignore1
-rw-r--r--vendor/github.com/mreiferson/go-httpclient/.travis.yml11
-rw-r--r--vendor/github.com/mreiferson/go-httpclient/README.md41
3 files changed, 53 insertions, 0 deletions
diff --git a/vendor/github.com/mreiferson/go-httpclient/.gitignore b/vendor/github.com/mreiferson/go-httpclient/.gitignore
new file mode 100644
index 00000000..dbec55fb
--- /dev/null
+++ b/vendor/github.com/mreiferson/go-httpclient/.gitignore
@@ -0,0 +1 @@
+*.sw[op]
diff --git a/vendor/github.com/mreiferson/go-httpclient/.travis.yml b/vendor/github.com/mreiferson/go-httpclient/.travis.yml
new file mode 100644
index 00000000..ba1b6b7f
--- /dev/null
+++ b/vendor/github.com/mreiferson/go-httpclient/.travis.yml
@@ -0,0 +1,11 @@
+language: go
+go:
+ - 1.1
+install:
+ - go get github.com/bmizerany/assert
+script:
+ - pushd $TRAVIS_BUILD_DIR
+ - go test
+ - popd
+notifications:
+ email: false
diff --git a/vendor/github.com/mreiferson/go-httpclient/README.md b/vendor/github.com/mreiferson/go-httpclient/README.md
new file mode 100644
index 00000000..6d0dbff9
--- /dev/null
+++ b/vendor/github.com/mreiferson/go-httpclient/README.md
@@ -0,0 +1,41 @@
+## go-httpclient
+
+**requires Go 1.1+** as of `v0.4.0` the API has been completely re-written for Go 1.1 (for a Go
+1.0.x compatible release see [1adef50](https://github.com/mreiferson/go-httpclient/tree/1adef50))
+
+[![Build
+Status](https://secure.travis-ci.org/mreiferson/go-httpclient.png?branch=master)](http://travis-ci.org/mreiferson/go-httpclient)
+
+Provides an HTTP Transport that implements the `RoundTripper` interface and
+can be used as a built in replacement for the standard library's, providing:
+
+ * connection timeouts
+ * request timeouts
+
+This is a thin wrapper around `http.Transport` that sets dial timeouts and uses
+Go's internal timer scheduler to call the Go 1.1+ `CancelRequest()` API.
+
+### Example
+
+```go
+transport := &httpclient.Transport{
+ ConnectTimeout: 1*time.Second,
+ RequestTimeout: 10*time.Second,
+ ResponseHeaderTimeout: 5*time.Second,
+}
+defer transport.Close()
+
+client := &http.Client{Transport: transport}
+req, _ := http.NewRequest("GET", "http://127.0.0.1/test", nil)
+resp, err := client.Do(req)
+if err != nil {
+ return err
+}
+defer resp.Body.Close()
+```
+
+*Note:* you will want to re-use a single client object rather than creating one for each request, otherwise you will end up [leaking connections](https://code.google.com/p/go/issues/detail?id=4049#c3).
+
+### Reference Docs
+
+For API docs see [godoc](http://godoc.org/github.com/mreiferson/go-httpclient).