summaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-11-01 16:17:41 -0600
committertjpcc <tjp@ctrl-c.club>2023-11-01 16:17:41 -0600
commita808b4692656c10bb43e2d54a2f5ef2746d231d5 (patch)
tree6e432d4a0271bb080451e3c87cffa6831c5736cd /client.go
parent5be7e44150d31582e6d8577d48c842a421fa8ddc (diff)
allow titan uploads in the meta-client
fixes #18
Diffstat (limited to 'client.go')
-rw-r--r--client.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/client.go b/client.go
index 26fed10..de8aed5 100644
--- a/client.go
+++ b/client.go
@@ -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