Skip to content
Snippets Groups Projects
Commit e97170d4 authored by Hugo NOUTS's avatar Hugo NOUTS
Browse files

update main.go

parent 2356d4b2
Branches
Tags
No related merge requests found
Pipeline #4986 failed
...@@ -25,10 +25,10 @@ func main() { ...@@ -25,10 +25,10 @@ func main() {
state := query.Get("state") state := query.Get("state")
response, err := http.Get("https://gw.hml.api.enedis.fr/group/espace-particuliers/consentement-linky/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri=https://oauth-proxy.wf.alpha.grandlyon.com/redirect&response_type=code&state="+ state +"-"+ cozyOrigin) response, err := http.Get("https://gw.hml.api.enedis.fr/group/espace-particuliers/consentement-linky/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri=https://oauth-proxy.wf.alpha.grandlyon.com/redirect&response_type=code&state="+ state +"-"+ cozyOrigin)
if err != nil { if err != nil {
fmt.Printf("%s", err) fmt.Println(err)
} else { } else {
defer response.Body.Close() defer response.Body.Close()
contents, err := ioutil.ReadAll(response.Body) contents := ioutil.ReadAll(response.Body)
fmt.Printf("%s\n", string(contents)) fmt.Printf("%s\n", string(contents))
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment