From 5c7ceb3935662de02ff8bc254425b614e526f7c8 Mon Sep 17 00:00:00 2001
From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com>
Date: Wed, 6 May 2020 18:58:05 +0200
Subject: [PATCH] Update main.go: fix token test

---
 main.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go
index 473611b..a784982 100644
--- a/main.go
+++ b/main.go
@@ -115,10 +115,10 @@ func main() {
 		data.Set("grant_type", grantType)
 		
 		client := &http.Client{}
-		r, _ := http.NewRequest("POST", tokenUrl, strings.NewReader(data.Encode())) // URL-encoded payload
-		r.Header.Add("Content-Type", "application/x-www-form-urlencoded")
+		req, _ := http.NewRequest("POST", tokenUrl, strings.NewReader(data.Encode()))
+		req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
 
-		response, err := client.Do(r)
+		response, err := client.Do(req)
 		fmt.Println(response.Status)
 		if err != nil {
 			fmt.Println(err)
-- 
GitLab