diff --git a/main.go b/main.go index 86a4add..0476097 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "encoding/json" "errors" "fmt" "log" @@ -130,6 +131,17 @@ func SendRequest(client *resty.Client, url string, ins []interface{}) { // Print response status log.Printf("Response Status: %s\n", resp.Status()) + + // Unmarshal response + var data Response + err = json.Unmarshal(resp.Body(), &data) + if err != nil { + log.Fatal(err) + return + } + + // Print response + log.Printf("Success: %t\n", data.success) } func main() {