Hello all,
I’m very new to zig, and relatively new to programming in general. I need to get a oauth2 token to be used with the Spotify API. That flow requires me to receive a request, redirect the response and then receive another request.
My problem is that when i use httpz, the server runs until I shut down the program (the server).
What I would like to do is:
Call the oauth2 flow from my main program (the one that actually works with the Spotify API) as a function f .
Receive the request needed and eventually get the token.
Return the token as a return value of the function f.
Is all of this possible using a library already built in zig?