summaryrefslogtreecommitdiff
path: root/gemini/client.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-11 10:36:56 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-11 10:36:56 -0700
commite183f9cd23380a81071c32f64c91e60f46a7d8cb (patch)
treed78b0a4936dee3e3201d97668bfb5de4492b3593 /gemini/client.go
parent197d8e4cb0170356dd20755efcf1d336c4c38583 (diff)
lots more documentation comments
Diffstat (limited to 'gemini/client.go')
-rw-r--r--gemini/client.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/gemini/client.go b/gemini/client.go
index 53c8b71..aca4576 100644
--- a/gemini/client.go
+++ b/gemini/client.go
@@ -28,6 +28,9 @@ func NewClient(tlsConf *tls.Config) Client {
//
// It also populates the TLSState and RemoteAddr fields on the request - the only field
// it needs populated beforehand is the URL.
+//
+// This method will not automatically follow redirects or cache permanent failures or
+// redirects.
func (client Client) RoundTrip(request *Request) (*Response, error) {
if request.Scheme != "gemini" && request.Scheme != "" {
return nil, errors.New("non-gemini protocols not supported")
@@ -57,8 +60,8 @@ func (client Client) RoundTrip(request *Request) (*Response, error) {
return nil, err
}
- // read and store the request body in full or we may miss doing so before the
- // connection gets closed.
+ // read and store the request body in full or we may miss doing so before
+ // closing the connection
bodybuf, err := io.ReadAll(response.Body)
if err != nil {
return nil, err