diff options
| author | tjpcc <tjp@ctrl-c.club> | 2023-11-01 16:17:41 -0600 | 
|---|---|---|
| committer | tjpcc <tjp@ctrl-c.club> | 2023-11-01 16:17:41 -0600 | 
| commit | a808b4692656c10bb43e2d54a2f5ef2746d231d5 (patch) | |
| tree | 6e432d4a0271bb080451e3c87cffa6831c5736cd /client.go | |
| parent | 5be7e44150d31582e6d8577d48c842a421fa8ddc (diff) | |
allow titan uploads in the meta-client
fixes #18
Diffstat (limited to 'client.go')
| -rw-r--r-- | client.go | 6 | 
1 files changed, 4 insertions, 2 deletions
| @@ -40,11 +40,13 @@ func NewClient(tlsConf *tls.Config) Client {  	if tlsConf != nil {  		hc.tp.TLSClientConfig = tlsConf  	} +	gemcl := gemini.NewClient(tlsConf)  	return Client{  		protos: map[string]protocolClient{  			"finger":  finger.Client{},  			"gopher":  gopher.Client{}, -			"gemini":  gemini.NewClient(tlsConf), +			"gemini":  gemcl, +			"titan":   gemcl,  			"spartan": spartan.NewClient(),  			"http":    hc,  			"https":   hc, @@ -95,7 +97,7 @@ func (c Client) Fetch(url string) (*Response, error) {  }  // Upload sends a request with a body and returns any redirect response. -func (c Client) Upload(url string, contents *io.LimitedReader) (*Response, error) { +func (c Client) Upload(url string, contents io.Reader) (*Response, error) {  	u, err := neturl.Parse(url)  	if err != nil {  		return nil, err | 
