File tree Expand file tree Collapse file tree
SpotifyAPI.Docs/docs/SpotifyWebAPI Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,15 +88,15 @@ static void Main(string[] args)
8888
8989static void auth_OnResponseReceivedEvent(Token token, string state, string error)
9090{
91- //stop the http server
92- auth.StopHttpServer();
93-
9491 var spotify = new SpotifyWebApiClass()
9592 {
9693 TokenType = token.TokenType,
9794 AccessToken = token.AccessToken
9895 };
9996 //We can now make calls with the token object
97+
98+ //stop the http server
99+ auth.StopHttpServer();
100100}
101101```
102102
@@ -138,8 +138,6 @@ static void Main(string[] args)
138138
139139private static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse response)
140140{
141- //Stop the HTTP Server, done.
142- auth.StopHttpServer();
143141
144142 //NEVER DO THIS! You would need to provide the ClientSecret.
145143 //You would need to do it e.g via a PHP-Script.
@@ -152,6 +150,9 @@ private static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse re
152150 };
153151
154152 //With the token object, you can now make API calls
153+
154+ //Stop the HTTP Server, done.
155+ auth.StopHttpServer();
155156}
156157```
157158
You can’t perform that action at this time.
0 commit comments