From a3c4dbab4a0f591a23de048d8fc2fba0eef6d0d0 Mon Sep 17 00:00:00 2001 From: Christoph Polcin Date: Tue, 15 May 2018 11:51:53 +0200 Subject: [PATCH] add SetTimeout --- client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.go b/client.go index 958fb0c..c0fef68 100644 --- a/client.go +++ b/client.go @@ -37,6 +37,10 @@ func (c *Client) SetHeader(key, value string) { c.headers.Add(key, value) } +func (c *Client) SetTimeout(timeout time.Duration) { + c.c.Timeout = timeout +} + func (c *Client) SetTransport(transport http.RoundTripper) { c.c.Transport = transport }