summaryrefslogtreecommitdiff
path: root/http-client/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'http-client/client.go')
-rw-r--r--http-client/client.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/http-client/client.go b/http-client/client.go
index d448b8c..57c4fad 100644
--- a/http-client/client.go
+++ b/http-client/client.go
@@ -7,7 +7,7 @@ import (
"errors"
"fmt"
"fyne.io/fyne/v2/data/binding"
- "io"
+ "io/ioutil"
"net/http"
"strings"
"sync"
@@ -78,7 +78,7 @@ func register(user UserData, serverKey string) (Response, error) {
return resp, err
}
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
_ = json.Unmarshal(body, &resp)
if httpResp.StatusCode == http.StatusOK {
@@ -98,7 +98,7 @@ func tryAuth(user UserData) (bool, error) {
return false, err
}
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
_ = json.Unmarshal(body, &resp)
if httpResp.StatusCode == http.StatusOK {
@@ -118,7 +118,7 @@ func getUserKey(user UserData, checkedUser string) (string, error) {
return "", err
}
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
_ = json.Unmarshal(body, &resp)
if httpResp.StatusCode == http.StatusOK {
@@ -170,7 +170,7 @@ func runClient(user UserData) {
lastPoll = time.Now().UnixNano()
if httpResp.StatusCode == http.StatusOK {
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
var resp Response
_ = json.Unmarshal(body, &resp)
var signedMessages []string
@@ -207,7 +207,7 @@ func runClient(user UserData) {
storage.Unlock()
} else {
fmt.Println(httpResp.StatusCode)
- ae, _ := io.ReadAll(httpResp.Body)
+ ae, _ := ioutil.ReadAll(httpResp.Body)
fmt.Println(string(ae))
}