Make TLS field nil for unencrypted connections

This commit is contained in:
Adnan Maolood
2021-02-08 12:32:47 -05:00
parent 1f39cab063
commit 29f2b3738d
4 changed files with 6 additions and 4 deletions

View File

@@ -101,7 +101,8 @@ func (c *Client) Do(req *Request) (*Response, error) {
}
// Store connection state
resp.TLS = conn.ConnectionState()
state := conn.ConnectionState()
resp.TLS = &state
return resp, nil
}