aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client.go')
-rw-r--r--client.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/client.go b/client.go
index 7a99592..f54148e 100644
--- a/client.go
+++ b/client.go
@@ -4,7 +4,6 @@ import (
"bytes"
"encoding/json"
"errors"
- "io/ioutil"
"log"
"net/http"
"net/textproto"
@@ -130,10 +129,12 @@ func (c *Client) Register(a *Account) error {
return err
}
defer resp.Body.Close()
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return err
- }
- log.Println(string(body))
+ re := RegistrationResp{}
+ err = json.NewDecoder(resp.Body).Decode(&re)
+ log.Println(re)
+ return err
+}
+
+func (c *Client) Authorize(a *Account, d []string) error {
return nil
}