From 2107a0586447e3e102667d5895d8c12827be5ebc Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Mon, 29 Mar 2021 17:23:20 -0500 Subject: [PATCH] Add debug flag --- client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.go b/client.go index e6878f5..0fdcf68 100644 --- a/client.go +++ b/client.go @@ -21,6 +21,7 @@ type ( accessToken string userAgent string Client *http.Client + debug bool } Result struct { @@ -102,6 +103,12 @@ func WithUserAgent(userAgent string) func(*Client) { } } +func WithDebug(debug bool) func(*Client) { + return func(c *Client) { + c.debug = debug + } +} + func NewClientWithUserAgent(accessToken string, userAgent string) *Client { tr := &http.Transport{ //TLSNextProto: make(map[string]func(authority string, c *tls.Conn) http.RoundTripper),