Skip to content

Commit 9f88a93

Browse files
committed
check eof
1 parent 580780f commit 9f88a93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tir/tirClient.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package tir
33
import (
44
"encoding/json"
55
"errors"
6+
"io"
67
"net/http"
78
"time"
89

@@ -150,6 +151,10 @@ func parseTirResponse(resp http.Response) (trustedIssuer TrustedIssuer, err erro
150151
return trustedIssuer, ErrorTirEmptyResponse
151152
}
152153

154+
body, _ := io.ReadAll(resp.Body)
155+
156+
logging.Log().Warnf("The body is %s", string(body))
157+
153158
err = json.NewDecoder(resp.Body).Decode(&trustedIssuer)
154159
if err != nil {
155160
logging.Log().Warn("Was not able to decode the tir-response.")

0 commit comments

Comments
 (0)